#29843 [Com]: A pretty segfault in ctype_digit()

From: Date: Wed, 25 Aug 2004 22:12:20 +0000
Subject: #29843 [Com]: A pretty segfault in ctype_digit()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65251@lists.php.net to get a copy of this message
ID: 29843 Comment by: kiad at free dot fr Reported By: guth at fiifo dot u-psud dot fr Status: Open Bug Type: Reproducible crash Operating System: Linux (Mandrake 9.2) PHP Version: 5.0.1 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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 (#65251) next »