diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:28 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:28 -0400 |
| commit | ba50031707469046407a35b77a3cd81351e951b3 (patch) | |
| tree | 5c03e723bdbfabae09d41a3ab1253dff41eeed4a /main/streams/memory.c | |
| parent | 0a36161e13484a99ccf69bb38f206462d27cc6d6 (diff) | |
| download | php-upstream/5.1.5.tar.gz | |
Imported Upstream version 5.1.5upstream/5.1.5
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; |
