summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorArnaud Le Blanc <lbarnaud@php.net>2009-05-08 09:44:17 +0000
committerArnaud Le Blanc <lbarnaud@php.net>2009-05-08 09:44:17 +0000
commit1d13e22f4194ba8cc60ec995a359da4032044b65 (patch)
tree843a2b0b62b09d7be102aa3ba5db591a43fc7c32 /ext/standard
parentc4cf7a858d7571a693e6eb219a65e5819d8537d0 (diff)
downloadphp-git-1d13e22f4194ba8cc60ec995a359da4032044b65.tar.gz
Fix invalid read
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index ae4fcb1f4a..d83f911805 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -785,7 +785,7 @@ parse_eol:
} 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)) {