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 c644d914dcfc2a9b77e2c289ae77ff62672c4a8e..9159106a81bb3e7235c4a5dacf54fbbf0dbd23db 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? */