aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/armor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/armor.c b/g10/armor.c
index 59a6202aa..9ea412ae3 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -1039,9 +1039,9 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
checkcrc++;
break;
}
- else if (c == '-'
- && afx->buffer_pos + 8 < afx->buffer_len
- && !strncmp (afx->buffer, "-----END ", 8)) {
+ else if (afx->buffer_pos == 1 && c == '-'
+ && afx->buffer_len > 9
+ && !strncmp (afx->buffer, "-----END ", 9)) {
break; /* End in --dearmor mode or No CRC. */
}
else {