summaryrefslogtreecommitdiffstats
path: root/g10/armor.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-11-27 15:33:31 +0100
committerWerner Koch <wk@gnupg.org>1998-11-27 15:33:31 +0100
commitd87a3c14c47e16bba135c2af948b00670fea8c30 (patch)
tree88d70f1ffab768ca109078faa5c6037c55f6bf28 /g10/armor.c
parentSee ChangeLog: Fri Nov 27 12:39:29 CET 1998 Werner Koch (diff)
downloadgnupg2-d87a3c14c47e16bba135c2af948b00670fea8c30.tar.xz
gnupg2-d87a3c14c47e16bba135c2af948b00670fea8c30.zip
See ChangeLog: Fri Nov 27 15:30:24 CET 1998 Werner Koch
Diffstat (limited to 'g10/armor.c')
-rw-r--r--g10/armor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/armor.c b/g10/armor.c
index 91eb55198..78656bae9 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -405,10 +405,11 @@ find_header( fhdr_state_t state, byte *buf, size_t *r_buflen,
c = 0;
for(n=0; n < buflen && (c=iobuf_get(a)) != -1 && c != '\n'; )
buf[n++] = c;
- if( n < buflen || c == '\n' ) {
- buf[n] = 0;
+ if( c != -1 ) {
if( n > 15 && !memcmp(buf, "-----", 5 ) )
state = fhdrNullClearsig;
+ else if( c != '\n' )
+ state = fhdrREADClearsigNext;
else
state = fhdrCHECKDashEscaped3;
}
@@ -693,6 +694,7 @@ check_input( armor_filter_context_t *afx, IOBUF a )
case fhdrNullClearsig:
case fhdrCLEARSIG: /* start fake package mode (for clear signatures) */
+ case fhdrREADClearsigNext:
case fhdrCLEARSIGSimple:
case fhdrCLEARSIGSimpleNext:
afx->helplen = n;