aboutsummaryrefslogtreecommitdiffstats
path: root/g10/armor.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/armor.c')
-rw-r--r--g10/armor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/armor.c b/g10/armor.c
index 38c48fbbe..053cae7ff 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -311,9 +311,15 @@ parse_header_line( armor_filter_context_t *afx, byte *line, unsigned len )
byte *p;
int hashes=0;
+ /* fixme: why this double check? I think the original code w/o the
+ * second check for an empty line was done from an early draft of
+ * of OpenPGP - or simply very stupid code */
if( *line == '\n' || ( len && (*line == '\r' && line[1]=='\n') ) )
return 0; /* empty line */
len = trim_trailing_ws( line, len );
+ if( !len )
+ return 0; /* WS only same as empty line */
+
p = strchr( line, ':');
if( !p || !p[1] ) {
log_error(_("invalid armor header: "));