aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/ChangeLog5
-rw-r--r--util/iobuf.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index 08c999ee3..3f9ba8351 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-01 David Shaw <[email protected]>
+
+ * iobuf.c (block_filter): Properly handle a partial body stream
+ that ends with a 5-byte length that happens to be zero.
+
2004-02-24 Werner Koch <[email protected]>
* secmem.c (lock_pool) [_AIX]: Also set errno.
diff --git a/util/iobuf.c b/util/iobuf.c
index 976a96fea..2e74da6ec 100644
--- a/util/iobuf.c
+++ b/util/iobuf.c
@@ -666,6 +666,12 @@ block_filter(void *opaque, int control, IOBUF chain, byte *buf, size_t *ret_len)
}
a->size |= c;
a->partial = 2;
+ if( !a->size ) {
+ a->eof = 1;
+ if( !n )
+ rc = -1;
+ break;
+ }
}
else { /* next partial body length */
a->size = 1 << (c & 0x1f);