#36508 [Opn->Bgs]: fgetcsv($fp, 2147483647) will cause segfault

From: Date: Fri, 24 Feb 2006 09:31:34 +0000
Subject: #36508 [Opn->Bgs]: fgetcsv($fp, 2147483647) will cause segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93609@lists.php.net to get a copy of this message
 ID:               36508
 Updated by:       tony2001@php.net
 Reported By:      sqchen at citiz dot net
-Status:           Open
+Status:           Bogus
-Bug Type:         Date/time related
+Bug Type:         Filesystem function related
 Operating System: redhat 7.3
 PHP Version:      5.1.2
 New Comment:

This segfault is expected if PHP has been built with --enable-debug.


Previous Comments:
------------------------------------------------------------------------

[2006-02-24 10:08:42] sqchen at citiz dot net

Description:
------------
fgetcsv($fp, 2147483647) will cause segfault, this behavior is same as
fgets ......

Reproduce code:
---------------
<?php
$fp =fopen("1.txt", "r");
fgetcsv($fp, 2147483647);
?>

Actual result:
--------------
FATAL:  emalloc():  Unable to allocate -2147483648 bytes
Segmentation fault



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36508&edit=1


Thread (2 messages)

« previous php.bugs (#93609) next »