aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/armor.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index ccb6ae42a..3d4d066b3 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-12 Werner Koch <[email protected]>
+
+ * armor.c (radix64_read): Change fix 2006-04-08 to fix bug#1179.
+
2010-05-07 Werner Koch <[email protected]>
* import.c (chk_self_sigs): Check direct key signatures. Fixes
diff --git a/g10/armor.c b/g10/armor.c
index 27c7e6fc8..0fbb99706 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -775,14 +775,14 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
if( !maxlen )
afx->truncated++;
if( !afx->buffer_len )
- break; /* eof */
+ break; /* eof */
continue;
}
again:
if( c == '\n' || c == ' ' || c == '\r' || c == '\t' )
continue;
- else if( c == '=' ) { /* pad character: stop */
+ else if( c == '=' ) { /* Pad character: stop or CRC sum starts. */
/* some mailers leave quoted-printable encoded characters
* so we try to workaround this */
if( afx->buffer_pos+2 < afx->buffer_len ) {
@@ -801,8 +801,9 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
goto again;
}
}
- else if(n==0)
- onlypad=1;
+
+ if (!n)
+ onlypad = 1;
if( idx == 1 )
buf[n++] = val;