From: Eugene Syromiatnikov Date: Tue, 30 Jun 2026 13:43:04 +0000 (+0200) Subject: crypto/pem/pem_info.c: avoid switching on PEM_INFO_NONE X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7c9b263005c5e886b4442e38ca846bbd2badd75b;p=thirdparty%2Fopenssl.git crypto/pem/pem_info.c: avoid switching on PEM_INFO_NONE Coverity complains that the switch statements in PEM_X509_INFO_read_bio_ex() switches on PEM_INFO_NONE, while the enclosing condition (itype != PEM_INFO_NONE) explicitly rules it out. Pacify it by changing the switch case to default (not removing it to avoid triggering -Werror=switch). Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1695453 Complements: 0e8f2844ed3e "fix function pointer type mismatch in PEM_X509_INFO_read_bio_ex" Signed-off-by: Eugene Syromiatnikov Reviewed-by: Nikola Pajkovsky Reviewed-by: Paul Dale MergeDate: Thu Jul 2 07:26:24 2026 (Merged from https://github.com/openssl/openssl/pull/31792) --- diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index d9bbb7256ee..fa189f0c5da 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -192,7 +192,7 @@ STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bp, STACK_OF(X509_INFO) *sk, decoded = d2i_AutoPrivateKey_ex((EVP_PKEY **)pp, &p, len, libctx, propq); break; - case PEM_INFO_NONE: + default: break; } if (decoded == NULL) {