aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/armor.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 0bbf97c03..ab2c38654 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-05 David Shaw <[email protected]>
+
+ * armor.c (radix64_read): No armor CRC is legal according to the
+ spec (the CRC is a MAY).
+
2004-07-28 David Shaw <[email protected]>
* misc.c (argsplit): Properly split quoted args from the keyword
diff --git a/g10/armor.c b/g10/armor.c
index 5e1732204..5cd798d83 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -771,7 +771,11 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
if( c == -1 ) {
log_info(_("premature eof (in CRC)\n"));
rc = invalid_crc();
- }
+ }
+ else if( idx == 0 ) {
+ /* No CRC at all is legal ("MAY") */
+ rc=0;
+ }
else if( idx != 4 ) {
log_info(_("malformed CRC\n"));
rc = invalid_crc();