diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2024-04-09 02:24:11 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2024-04-09 02:24:11 +0200 |
commit | 3a344d6236521d768793e8b34a96a18ce13bab0e (patch) | |
tree | fdda5abdacfa8f7179970833d200a494e0544d26 /g10/armor.c | |
parent | kbx: Fix keyid search for mixed v4/v5 case. (diff) | |
download | gnupg2-3a344d6236521d768793e8b34a96a18ce13bab0e.tar.xz gnupg2-3a344d6236521d768793e8b34a96a18ce13bab0e.zip |
gpg: Allow no CRC24 checksum in armor.
* g10/armor.c (radix64_read): Detect the end of armor when
there is no CRC24 checksum.
--
GnuPG-bug-id: 7071
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to '')
-rw-r--r-- | g10/armor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/armor.c b/g10/armor.c index b47c04ab3..81af15339 100644 --- a/g10/armor.c +++ b/g10/armor.c @@ -1031,10 +1031,10 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn, checkcrc++; break; } - else if (afx->dearmor_state && c == '-' + else if (c == '-' && afx->buffer_pos + 8 < afx->buffer_len && !strncmp (afx->buffer, "-----END ", 8)) { - break; /* End in --dearmor mode. */ + break; /* End in --dearmor mode or No CRC. */ } else { log_error(_("invalid radix64 character %02X skipped\n"), c); |