projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
614f707
)
- avoid warning in http_encoding_inflate_stream_finish()
author
Michael Wallner
<mike@php.net>
Sat, 20 May 2006 15:31:44 +0000
(15:31 +0000)
committer
Michael Wallner
<mike@php.net>
Sat, 20 May 2006 15:31:44 +0000
(15:31 +0000)
if there's nothing left to inflate
http_encoding_api.c
patch
|
blob
|
history
diff --git
a/http_encoding_api.c
b/http_encoding_api.c
index 178c9925a34de64e760fa1aec9f715edef816c9c..28f6a9d0daf3d82003baf9997cca67bad159bf51 100644
(file)
--- 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);