MFPHP: choke on Z_OK if we expect Z_STREAM_END
authorMichael Wallner <mike@php.net>
Tue, 29 Dec 2009 12:21:24 +0000 (12:21 +0000)
committerMichael Wallner <mike@php.net>
Tue, 29 Dec 2009 12:21:24 +0000 (12:21 +0000)
http_encoding_api.c

index c644d91..9159106 100644 (file)
@@ -327,10 +327,13 @@ retry_raw_inflate:
                Z.avail_in = data_len;
                
                switch (status = http_inflate_rounds(&Z, Z_NO_FLUSH, decoded, decoded_len)) {
-                       case Z_OK:
                        case Z_STREAM_END:
                                inflateEnd(&Z);
                                return SUCCESS;
+
+                       case Z_OK:
+                               status = Z_DATA_ERROR;
+                               break;
                        
                        case Z_DATA_ERROR:
                                /* raw deflated data? */