aboutsummaryrefslogtreecommitdiffstats
path: root/util/iobuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/iobuf.c')
-rw-r--r--util/iobuf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/util/iobuf.c b/util/iobuf.c
index 3d55349b8..aae03c9ea 100644
--- a/util/iobuf.c
+++ b/util/iobuf.c
@@ -1,5 +1,6 @@
/* iobuf.c - file handling
- * Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2003,
+ * 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -666,6 +667,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);