Browse Source

- MFH Fix seek/eof issue in temp streams

PHP-5.1
Marcus Boerger 21 years ago
parent
commit
fa922fb51c
  1. 2
      main/streams/memory.c

2
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;

Loading…
Cancel
Save