summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/zlib/zlib_fopen_wrapper.c4
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;