]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix potential crasher if a compressed request is interrupted.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 23 Oct 2013 20:33:10 +0000 (20:33 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 23 Oct 2013 20:33:10 +0000 (20:33 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11355 a1ca3aef-8c08-0410-bb20-df032aa958be

cups/http.c

index 1881d50270814efd44277be0ea69d21cfbf104ea..5beb9a94f73e7cab08ad287287bb8aa78d005f49 100644 (file)
@@ -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;