diff options
Diffstat (limited to 'main/streams/memory.c')
| -rw-r--r-- | main/streams/memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c index c15d8205c..30b1caad6 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: memory.c,v 1.8.2.5 2006/01/05 22:03:07 helly Exp $ */ +/* $Id: memory.c,v 1.8.2.6 2006/03/18 19:57:00 helly Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -159,7 +159,7 @@ static int php_stream_memory_seek(php_stream *stream, off_t offset, int whence, return 0; } } else { - if (ms->fpos < (size_t)(offset)) { + if (ms->fpos + (size_t)(offset) > ms->fsize) { ms->fpos = ms->fsize; *newoffs = -1; return -1; |
