diff options
author | David Shaw <[email protected]> | 2004-03-01 21:45:54 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-03-01 21:45:54 +0000 |
commit | 49b6b719194dbf2edbbcd22d7dfe87a2e6a5de9a (patch) | |
tree | 3b97d7d1325c9c70c6c3de8a9e47b491d509be22 | |
parent | * options.h (ctrl): New for member IN_AUTO_KEY_RETRIEVE. (diff) | |
download | gnupg-49b6b719194dbf2edbbcd22d7dfe87a2e6a5de9a.tar.gz gnupg-49b6b719194dbf2edbbcd22d7dfe87a2e6a5de9a.zip |
* iobuf.c (block_filter): Properly handle a partial body stream that ends
with a 5-byte length that happens to be zero.
-rw-r--r-- | util/ChangeLog | 5 | ||||
-rw-r--r-- | util/iobuf.c | 6 |
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); |