summaryrefslogtreecommitdiff
path: root/cups/http.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2013-10-23 20:33:10 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2013-10-23 20:33:10 +0000
commitd22632216241cc6e49665449b1a0d906668ea252 (patch)
tree857e08bc9e6b1849113e29f4ef9a9bdbb93e4706 /cups/http.c
parent3463c27a30c82952bb551ecb30b2409538fe62d9 (diff)
downloadcups-d22632216241cc6e49665449b1a0d906668ea252.tar.gz
Fix potential crasher if a compressed request is interrupted.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11355 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/http.c')
-rw-r--r--cups/http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cups/http.c b/cups/http.c
index 1881d5027..5beb9a94f 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -3682,12 +3682,16 @@ http_content_coding_finish(
http_t *http) /* I - HTTP connection */
{
int zerr; /* Compression status */
+ Byte dummy[1]; /* Dummy read buffer */
switch (http->coding)
{
case _HTTP_CODING_DEFLATE :
case _HTTP_CODING_GZIP :
+ http->stream.next_in = dummy;
+ http->stream.avail_in = 0;
+
do
{
http->stream.next_out = (Bytef *)http->wbuffer + http->wused;