lbarnaud Fri May 8 09:44:18 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/standard file.c
Log:
Fix invalid read
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.31&r2=1.409.2.6.2.28.2.32&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.31
php-src/ext/standard/file.c:1.409.2.6.2.28.2.32
--- php-src/ext/standard/file.c:1.409.2.6.2.28.2.31 Sun Apr 19 17:10:34 2009
+++ php-src/ext/standard/file.c Fri May 8 09:44:17 2009
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.409.2.6.2.28.2.31 2009/04/19 17:10:34 lbarnaud Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.28.2.32 2009/05/08 09:44:17 lbarnaud Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -785,7 +785,7 @@
} else {
do {
int windows_eol = 0;
- if (eol_marker == '\n' && *(p - 1) == '\r') {
+ if (p != target_buf && eol_marker == '\n' &&
*(p - 1) == '\r') {
windows_eol++;
}
if (skip_blank_lines && !(p-s-windows_eol)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php