X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=crypt.c;h=fbe984a9157fcb365dea663e1561d6c8f124e53c;hp=2b2412ec928ab2b2579dbb566d160b7cd41eb4d6;hb=62781e50bfc69cf85be21ec9a18aeb32ef789952;hpb=74a2265af51ce89bca845adc1d68f273c9933c13 diff --git a/crypt.c b/crypt.c index 2b2412e..fbe984a 100644 --- a/crypt.c +++ b/crypt.c @@ -386,7 +386,7 @@ int mutt_is_application_smime (BODY * m) /* no .p7c, .p10 support yet. */ - len = mutt_strlen (t) - 4; + len = safe_strlen (t) - 4; if (len > 0 && *(t + len) == '.') { len++; if (!ascii_strcasecmp ((t + len), "p7m")) @@ -528,7 +528,7 @@ void convert_to_7bit (BODY * a) convert_to_7bit (a->parts); } else if (a->type == TYPEMESSAGE && - mutt_strcasecmp (a->subtype, "delivery-status")) { + safe_strcasecmp (a->subtype, "delivery-status")) { if (a->encoding != ENC7BIT) mutt_message_to_7bit (a, NULL); } @@ -755,7 +755,7 @@ void mutt_signed_handler (BODY * a, STATE * s) /* consistency check */ if (!(a && a->next && a->next->type == protocol_major && - !mutt_strcasecmp (a->next->subtype, protocol_minor))) { + !safe_strcasecmp (a->next->subtype, protocol_minor))) { state_attach_puts (_("[-- Error: " "Inconsistent multipart/signed structure! --]\n\n"), s); @@ -766,13 +766,13 @@ void mutt_signed_handler (BODY * a, STATE * s) if ((WithCrypto & APPLICATION_PGP) && protocol_major == TYPEAPPLICATION - && !mutt_strcasecmp (protocol_minor, "pgp-signature")); + && !safe_strcasecmp (protocol_minor, "pgp-signature")); else if ((WithCrypto & APPLICATION_SMIME) && protocol_major == TYPEAPPLICATION - && !(mutt_strcasecmp (protocol_minor, "x-pkcs7-signature") - && mutt_strcasecmp (protocol_minor, "pkcs7-signature"))); + && !(safe_strcasecmp (protocol_minor, "x-pkcs7-signature") + && safe_strcasecmp (protocol_minor, "pkcs7-signature"))); else if (protocol_major == TYPEMULTIPART - && !mutt_strcasecmp (protocol_minor, "mixed")); + && !safe_strcasecmp (protocol_minor, "mixed")); else { state_printf (s, _("[-- Error: " "Unknown multipart/signed protocol %s! --]\n\n"), @@ -791,7 +791,7 @@ void mutt_signed_handler (BODY * a, STATE * s) for (i = 0; i < sigcnt; i++) { if ((WithCrypto & APPLICATION_PGP) && signatures[i]->type == TYPEAPPLICATION - && !mutt_strcasecmp (signatures[i]->subtype, "pgp-signature")) { + && !safe_strcasecmp (signatures[i]->subtype, "pgp-signature")) { if (crypt_pgp_verify_one (signatures[i], s, tempfile) != 0) goodsig = 0; @@ -801,8 +801,8 @@ void mutt_signed_handler (BODY * a, STATE * s) if ((WithCrypto & APPLICATION_SMIME) && signatures[i]->type == TYPEAPPLICATION && - (!mutt_strcasecmp (signatures[i]->subtype, "x-pkcs7-signature") - || !mutt_strcasecmp (signatures[i]->subtype, + (!safe_strcasecmp (signatures[i]->subtype, "x-pkcs7-signature") + || !safe_strcasecmp (signatures[i]->subtype, "pkcs7-signature"))) { if (crypt_smime_verify_one (signatures[i], s, tempfile) != 0) goodsig = 0;