Bug #12154 Updated: GP Fault in Kernel32 if buffer too small in fgetcsv()
| From: | jmoore@php.net | Date: | Tue, 30 Oct 2001 16:51:48 +0000 |
| Subject: | Bug #12154 Updated: GP Fault in Kernel32 if buffer too small in fgetcsv() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-69341@lists.php.net to get a copy of this message | ||
ID: 12154
Updated by: jmoore
Reported By: ken.gregg@rwre.com
Old Status: Open
Status: Closed
Bug Type: Reproducible crash
Operating System: Win 95 SR2.1
PHP Version: 4.0.6
New Comment:
Cant reproduce.. looks like its been fixed to me, please reopen if it still occurs with latest cvs
version.
Cheers,
- James
Previous Comments:
------------------------------------------------------------------------
[2001-07-13 18:26:03] ken.gregg@rwre.com
array = fgetcsv(fh, length[, delim]);
Documentation says length must be longer than the longest line including eol
chars. But it shouldn't gp fault.
Nice function. But it would sure be nice to not have to know the length of the
longest line. This was a 75 mb file and it was 50% in that one line was 8K.
Easily reproduced. As soon as a line longer than the length parameter is
encountered, immediate gp fault.
PHP caused an invalid page fault in
module KERNEL32.DLL at 016f:bff78769.
Registers:
EAX=06203538 CS=016f EIP=bff78769 EFLGS=00010202
EBX=0065eff8 SS=0177 ESP=0063f774 EBP=0063f7a8
ECX=39393120 DS=0177 ESI=0065e028 FS=ece7
EDX=2d2d2036 ES=0177 EDI=06204508 GS=0000
Bytes at CS:EIP:
89 51 08 8b 53 08 8b 43 04 8d 8b 0b 10 00 00 c1
Stack dump:
0063f7a8 0065e030 00650000 0065c0b0 bff7994e 00650000 0065e028 00000fd0
00000200 00654240 0065e818 0065dcf0 0065e028 0063f7f0 7800113d 00650000
freebsd - php 4.0.2 core dumps on this also. php exits with message:
php in malloc() warning: modified (chunk-) pointer.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12154&edit=1