From: Dr. David von Oheimb Date: Fri, 19 Nov 2021 10:58:40 +0000 (+0100) Subject: ERR: exempt flags from fallback decimal reason code printing X-Git-Tag: openssl-3.2.0-alpha1~3315 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9350aaa41db8fcb0b55dadbd5fbe807ef5288557;p=thirdparty%2Fopenssl.git ERR: exempt flags from fallback decimal reason code printing Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/17072) --- diff --git a/crypto/err/err.c b/crypto/err/err.c index 60a9b02d19a..0f584fdf80c 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -527,7 +527,8 @@ void ossl_err_string_int(unsigned long e, const char *func, } #endif if (rs == NULL) { - BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); + BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", + r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET)); rs = rsbuf; }