#29843 [Opn->Csd]: A pretty segfault in ctype_digit()

From: Date: Thu, 26 Aug 2004 00:03:43 +0000
Subject: #29843 [Opn->Csd]: A pretty segfault in ctype_digit()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65255@lists.php.net to get a copy of this message
ID: 29843 Updated by: iliaa@php.net Reported By: guth at fiifo dot u-psud dot fr -Status: Open +Status: Closed Bug Type: Reproducible crash Operating System: Linux (Mandrake 9.2) PHP Version: 5.0.1 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2004-08-26 00:12:14] kiad at free dot fr It seems the bug comes from ctype librairy : #include <ctype.h> int main(int argc, char ** argv) { int i = isdigit(1000000000); } $ gcc test.c -o plop $ ./plop Segmentation fault ------------------------------------------------------------------------ [2004-08-26 00:08:08] guth at fiifo dot u-psud dot fr Description: ------------ Please excuse me for my english, but i am french... So i found a problem with ctype_digit() function, who seems to crash PHP with a big (or not ?) integer. Reproduce code: --------------- <? $id = 1000000000; ctype_digit($id); ?> Expected result: ---------------- A warning or something like that, because $id is an integer, but not a segfault... Actual result: -------------- nothing, except a new line in my apache error_log file : [Thu Aug 26 00:00:18 2004] [notice] child pid 3877 exit signal Segmentation fault (11) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29843&edit=1

« previous php.bugs (#65255) next »