summaryrefslogtreecommitdiff
path: root/main/streams.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/streams.c')
-rwxr-xr-xmain/streams.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams.c b/main/streams.c
index 7225921705..bcb210aa2d 100755
--- a/main/streams.c
+++ b/main/streams.c
@@ -512,7 +512,7 @@ PHPAPI char *_php_stream_gets(php_stream *stream, char *buf, size_t maxlen TSRML
eol = memchr(readptr, '\n', avail);
}
- if (eol && (eol + 1 - readptr) <= maxlen - 1) {
+ if (eol && ((ptrdiff_t)eol + 1 - (ptrdiff_t)readptr) <= maxlen - 1) {
justread = eol + 1 - readptr;
} else {
eol = NULL;