Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f0ac675806441d17303707856f4d23bd27092014
Commit:     f0ac675806441d17303707856f4d23bd27092014
Parent:     c24228daa1e489721812815838220de607260df9
Author:     Richard Purdie <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:51:56 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:13:04 2007 -0700

    Fix ppp_deflate issues with recent zlib_inflate changes
    
    The last zlib_inflate update broke certain corner cases for ppp_deflate
    decompression handling.  This patch fixes some logic to make things work
    properly again.  Users other than ppp_deflate (the only Z_PACKET_FLUSH
    user) should be unaffected.
    
    Fixes bug 8405 (confirmed by Stefan)
    
    Signed-off-by: Richard Purdie <[EMAIL PROTECTED]>
    Cc: Stefan Wenk <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 lib/zlib_inflate/inflate.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c
index fceb97c..7e1e311 100644
--- a/lib/zlib_inflate/inflate.c
+++ b/lib/zlib_inflate/inflate.c
@@ -743,12 +743,14 @@ int zlib_inflate(z_streamp strm, int flush)
 
     strm->data_type = state->bits + (state->last ? 64 : 0) +
                       (state->mode == TYPE ? 128 : 0);
-    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
-        ret = Z_BUF_ERROR;
 
     if (flush == Z_PACKET_FLUSH && ret == Z_OK &&
-            (strm->avail_out != 0 || strm->avail_in == 0))
+            strm->avail_out != 0 && strm->avail_in == 0)
                return zlib_inflateSyncPacket(strm);
+
+    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
+        ret = Z_BUF_ERROR;
+
     return ret;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to