summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-03-18 19:57:00 +0000
committerMarcus Boerger <helly@php.net>2006-03-18 19:57:00 +0000
commitfa922fb51cbada2a1fa9aec5dd542979f13a456b (patch)
treea7c0f905d7264d9d747290c53d18a135c8fcedd2
parent2ea6d46e4f3628298f93017af24c4b690017d2c7 (diff)
downloadphp-git-fa922fb51cbada2a1fa9aec5dd542979f13a456b.tar.gz
- MFH Fix seek/eof issue in temp streams
-rw-r--r--main/streams/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c
index 5de3ba2bab..1953d71e25 100644
--- a/main/streams/memory.c
+++ b/main/streams/memory.c
@@ -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;