]> granicus.if.org Git - php/commitdiff
- MFH: Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results)
authorFelipe Pena <felipe@php.net>
Tue, 20 Jan 2009 15:43:06 +0000 (15:43 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 20 Jan 2009 15:43:06 +0000 (15:43 +0000)
NEWS
ext/zlib/zlib_fopen_wrapper.c

diff --git a/NEWS b/NEWS
index fde8dd18c160fb9e5d663a536b2f4b54e1cc94a5..9113cc6ba6a24041e60734158ec9056567a75a5a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ PHP                                                                        NEWS
 - Fixed bug in xml_error_string() which resulted in messages being
   off by one. (Scott)
 
+- Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results).
+  (Felipe)
 - Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting). (Ilia)
 - Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
 - Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
index dc4c5a70bfb2ef90114529af422869dee8078b9c..fb71cf11048a6d6dd0b278bbef940df2972b51ec 100644 (file)
@@ -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;