X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_encoding_api.c;h=28f6a9d0daf3d82003baf9997cca67bad159bf51;hb=b20ced89bee0617c45447f51ed0baa7046851a65;hp=178c9925a34de64e760fa1aec9f715edef816c9c;hpb=2f39230d83bdf816dcae52c7e5a1b019347f0e7b;p=m6w6%2Fext-http diff --git a/http_encoding_api.c b/http_encoding_api.c index 178c992..28f6a9d 100644 --- a/http_encoding_api.c +++ b/http_encoding_api.c @@ -571,6 +571,12 @@ PHP_HTTP_API STATUS _http_encoding_inflate_stream_finish(http_encoding_stream *s { int status; + if (!PHPSTR_LEN(s->stream.opaque)) { + *decoded = NULL; + *decoded_len = 0; + return SUCCESS; + } + *decoded_len = (PHPSTR_LEN(s->stream.opaque) + 1) * HTTP_INFLATE_ROUNDS; *decoded = emalloc_rel(*decoded_len);