From: Michael Wallner Date: Sat, 20 May 2006 15:31:44 +0000 (+0000) Subject: - avoid warning in http_encoding_inflate_stream_finish() X-Git-Tag: RELEASE_1_0_0~22 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a2eb0fbb49c32af6611b10c8577d23aff532466a;p=m6w6%2Fext-http - avoid warning in http_encoding_inflate_stream_finish() if there's nothing left to inflate --- 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);