cvs: php-src(PHP_4_3) /ext/standard file.c

From: Date: Tue, 23 Dec 2003 11:02:27 +0000
Subject: cvs: php-src(PHP_4_3) /ext/standard file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-25412@lists.php.net to get a copy of this message
moriyoshi Tue Dec 23 06:02:27 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard file.c Log: Fix fgetcsv()'s null line handling. # Thanks Takeshi Nakamura for reporting this bug. Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.279.2.47 php-src/ext/standard/file.c:1.279.2.48 --- php-src/ext/standard/file.c:1.279.2.47 Mon Dec 22 16:03:54 2003 +++ php-src/ext/standard/file.c Tue Dec 23 06:02:26 2003 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.279.2.47 2003/12/22 21:03:54 iliaa Exp $ */ +/* $Id: file.c,v 1.279.2.48 2003/12/23 11:02:26 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2257,11 +2257,11 @@ re = e = buf + buf_len; /* strip leading spaces */ - while (isspace((int)*(unsigned char *)s) && *s != delimiter) { + while (isspace((int)*(unsigned char *)s) && *s != delimiter && s < re) { s++; } /* strip trailing spaces */ - while (isspace((int)*(unsigned char *)(--e)) && *e != delimiter); + while (e >= s && isspace((int)*(unsigned char *)(--e)) && *e != delimiter); e++; array_init(return_value);

« previous php.cvs (#25412) next »