diff options
author | Felipe Pena <felipe@php.net> | 2009-01-20 15:41:23 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2009-01-20 15:41:23 +0000 |
commit | 0b3afcf67b35e3ec3929da266a28e5df9df962ff (patch) | |
tree | 13ed9b8003faa1eb92b93c704798f58c1264ccb1 | |
parent | d4e765f4a631df8201b9a0e855177d99375407a7 (diff) | |
download | php-git-0b3afcf67b35e3ec3929da266a28e5df9df962ff.tar.gz |
- MFH: Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results)
-rw-r--r-- | ext/zlib/zlib_fopen_wrapper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index dc4c5a70bf..fb71cf1104 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -60,6 +60,10 @@ static int php_gziop_seek(php_stream *stream, off_t offset, int whence, off_t *n assert(self != NULL); + if (whence == SEEK_END) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SEEK_END is not supported"); + return -1; + } *newoffs = gzseek(self->gz_file, offset, whence); return (*newoffs < 0) ? -1 : 0; |