openssl-3.2.2-8.fc42

List of Findings

Error: SHELLCHECK_WARNING: [#def1]
/usr/bin/make-dummy-cert:15:7: warning[SC3004]: In POSIX sh, $".." is undefined.
#   13|   
#   14|   if [ $# -eq 0 ] ; then
#   15|-> 	echo $"Usage: `basename $0` filename [...]"
#   16|   	exit 0
#   17|   fi

Error: SHELLCHECK_WARNING (CWE-88): [#def2]
/usr/bin/make-dummy-cert:19:15: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   17|   fi
#   18|   
#   19|-> for target in $@ ; do
#   20|   	PEM1=`/bin/mktemp /tmp/openssl.XXXXXX`
#   21|   	PEM2=`/bin/mktemp /tmp/openssl.XXXXXX`

Error: SHELLCHECK_WARNING (CWE-569): [#def3]
/usr/bin/make-dummy-cert:22:14: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#   20|   	PEM1=`/bin/mktemp /tmp/openssl.XXXXXX`
#   21|   	PEM2=`/bin/mktemp /tmp/openssl.XXXXXX`
#   22|-> 	trap "rm -f $PEM1 $PEM2" SIGINT
#   23|   	answers | /usr/bin/openssl req -newkey rsa:2048 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 2> /dev/null
#   24|   	cat $PEM1 >  ${target}

Error: SHELLCHECK_WARNING (CWE-569): [#def4]
/usr/bin/make-dummy-cert:22:20: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#   20|   	PEM1=`/bin/mktemp /tmp/openssl.XXXXXX`
#   21|   	PEM2=`/bin/mktemp /tmp/openssl.XXXXXX`
#   22|-> 	trap "rm -f $PEM1 $PEM2" SIGINT
#   23|   	answers | /usr/bin/openssl req -newkey rsa:2048 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 2> /dev/null
#   24|   	cat $PEM1 >  ${target}

Error: SHELLCHECK_WARNING: [#def5]
/usr/bin/make-dummy-cert:22:27: warning[SC3048]: In POSIX sh, prefixing signal names with 'SIG' is undefined.
#   20|   	PEM1=`/bin/mktemp /tmp/openssl.XXXXXX`
#   21|   	PEM2=`/bin/mktemp /tmp/openssl.XXXXXX`
#   22|-> 	trap "rm -f $PEM1 $PEM2" SIGINT
#   23|   	answers | /usr/bin/openssl req -newkey rsa:2048 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 2> /dev/null
#   24|   	cat $PEM1 >  ${target}

Error: SHELLCHECK_WARNING (CWE-569): [#def6]
/usr/bin/renew-dummy-cert:14:13: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#   12|   NEW=${PEM}_
#   13|   
#   14|-> trap "rm -f $REQ $KEY $CRT $NEW" SIGINT
#   15|   
#   16|   if [ ! -f $PEM ]; then

Error: SHELLCHECK_WARNING (CWE-569): [#def7]
/usr/bin/renew-dummy-cert:14:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#   12|   NEW=${PEM}_
#   13|   
#   14|-> trap "rm -f $REQ $KEY $CRT $NEW" SIGINT
#   15|   
#   16|   if [ ! -f $PEM ]; then

Error: SHELLCHECK_WARNING (CWE-569): [#def8]
/usr/bin/renew-dummy-cert:14:23: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#   12|   NEW=${PEM}_
#   13|   
#   14|-> trap "rm -f $REQ $KEY $CRT $NEW" SIGINT
#   15|   
#   16|   if [ ! -f $PEM ]; then

Error: SHELLCHECK_WARNING (CWE-569): [#def9]
/usr/bin/renew-dummy-cert:14:28: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#   12|   NEW=${PEM}_
#   13|   
#   14|-> trap "rm -f $REQ $KEY $CRT $NEW" SIGINT
#   15|   
#   16|   if [ ! -f $PEM ]; then

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
openssl-3.2.2-build/openssl-3.2.2/apps/speed.c: scope_hint: In function 'do_multi'
openssl-3.2.2-build/openssl-3.2.2/apps/speed.c:4500:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup(fd[1])'
# 4498|               close(fd[0]);
# 4499|               close(1);
# 4500|->             if (dup(fd[1]) == -1) {
# 4501|                   BIO_printf(bio_err, "dup failed\n");
# 4502|                   exit(1);

Error: CPPCHECK_WARNING (CWE-562): [#def11]
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/a_d2i_fp.c:53: error[returnDanglingLifetime]: Returning pointer to local variable 'p' that will be invalid when returning.
#   51|    err:
#   52|       BUF_MEM_free(b);
#   53|->     return ret;
#   54|   }
#   55|   

Error: CPPCHECK_WARNING (CWE-562): [#def12]
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/a_dup.c:38: error[returnDanglingLifetime]: Returning pointer to local variable 'p2' that will be invalid when returning.
#   36|       ret = d2i(NULL, &p2, i);
#   37|       OPENSSL_free(b);
#   38|->     return ret;
#   39|   }
#   40|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/ameth_lib.c: scope_hint: In function 'EVP_PKEY_asn1_find_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/ameth_lib.c:133:18: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#  131|       for (i = EVP_PKEY_asn1_get_count(); i-- > 0; ) {
#  132|           ameth = EVP_PKEY_asn1_get0(i);
#  133|->         if (ameth->pkey_flags & ASN1_PKEY_ALIAS)
#  134|               continue;
#  135|           if ((int)strlen(ameth->pem_str) == len

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/asn_mime.c: scope_hint: In function 'mime_hdr_addparam'
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/asn_mime.c:911:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mhdr'
openssl-3.2.2-build/openssl-3.2.2/include/internal/e_os.h:17: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/common.h:18: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/cryptlib.h:21: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/asn_mime.c:12: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/asn1/asn_mime.c:906:14: note: in expansion of macro 'OPENSSL_malloc'
#  909|       mparam->param_name = tmpname;
#  910|       mparam->param_value = tmpval;
#  911|->     if (!sk_MIME_PARAM_push(mhdr->params, mparam))
#  912|           goto err;
#  913|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-465): [#def15]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_blind.c: scope_hint: In function 'BN_BLINDING_update'
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_blind.c:106:12: warning[-Wanalyzer-deref-before-check]: check of 'b' for NULL after already dereferencing it
#  104|           !(b->flags & BN_BLINDING_NO_RECREATE)) {
#  105|           /* re-create blinding parameters */
#  106|->         if (!BN_BLINDING_create_param(b, NULL, NULL, ctx, NULL, NULL))
#  107|               goto err;
#  108|       } else if (!(b->flags & BN_BLINDING_NO_UPDATE)) {

Error: CPPCHECK_WARNING (CWE-758): [#def16]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_lib.c:45: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   43|               mult = sizeof(int) * 8 - 1;
#   44|           bn_limit_bits = mult;
#   45|->         bn_limit_num = 1 << mult;
#   46|       }
#   47|       if (high >= 0) {

Error: CPPCHECK_WARNING (CWE-758): [#def17]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_lib.c:51: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   49|               high = sizeof(int) * 8 - 1;
#   50|           bn_limit_bits_high = high;
#   51|->         bn_limit_num_high = 1 << high;
#   52|       }
#   53|       if (low >= 0) {

Error: CPPCHECK_WARNING (CWE-758): [#def18]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_lib.c:57: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   55|               low = sizeof(int) * 8 - 1;
#   56|           bn_limit_bits_low = low;
#   57|->         bn_limit_num_low = 1 << low;
#   58|       }
#   59|       if (mont >= 0) {

Error: CPPCHECK_WARNING (CWE-758): [#def19]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_lib.c:63: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   61|               mont = sizeof(int) * 8 - 1;
#   62|           bn_limit_bits_mont = mont;
#   63|->         bn_limit_num_mont = 1 << mont;
#   64|       }
#   65|   }

Error: GCC_ANALYZER_WARNING (CWE-465): [#def20]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_lib.c: scope_hint: In function 'BN_set_bit'
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_lib.c:800:12: warning[-Wanalyzer-deref-before-check]: check of 'a' for NULL after already dereferencing it
#  798|       j = n % BN_BITS2;
#  799|       if (a->top <= i) {
#  800|->         if (bn_wexpand(a, i + 1) == NULL)
#  801|               return 0;
#  802|           for (k = a->top; k < i + 1; k++)

Error: CPPCHECK_WARNING (CWE-786): [#def21]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_nist.c:599: error[negativeIndex]: Array 'buf.bn[4]' accessed at index -3, which is out of bounds.
#  597|           BN_ULONG t_d[BN_NIST_224_TOP];
#  598|   
#  599|->         nist_set_224(t_d, buf.bn, 10, 9, 8, 7, 0, 0, 0);
#  600|           carry = (int)bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP);
#  601|           nist_set_224(t_d, buf.bn, 0, 13, 12, 11, 0, 0, 0);

Error: CPPCHECK_WARNING (CWE-786): [#def22]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_nist.c:601: error[negativeIndex]: Array 'buf.bn[4]' accessed at index -3, which is out of bounds.
#  599|           nist_set_224(t_d, buf.bn, 10, 9, 8, 7, 0, 0, 0);
#  600|           carry = (int)bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP);
#  601|->         nist_set_224(t_d, buf.bn, 0, 13, 12, 11, 0, 0, 0);
#  602|           carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP);
#  603|           nist_set_224(t_d, buf.bn, 13, 12, 11, 10, 9, 8, 7);

Error: CPPCHECK_WARNING (CWE-786): [#def23]
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_nist.c:605: error[negativeIndex]: Array 'buf.bn[4]' accessed at index -3, which is out of bounds.
#  603|           nist_set_224(t_d, buf.bn, 13, 12, 11, 10, 9, 8, 7);
#  604|           carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP);
#  605|->         nist_set_224(t_d, buf.bn, 0, 0, 0, 0, 13, 12, 11);
#  606|           carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP);
#  607|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def24]
openssl-3.2.2-build/openssl-3.2.2/crypto/cast/c_skey.c: scope_hint: In function 'CAST_set_key'
openssl-3.2.2-build/openssl-3.2.2/crypto/cast/c_skey.c:122:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'k[<unknown>]'
#  120|       for (i = 0; i < 16; i++) {
#  121|           key->data[i * 2] = k[i];
#  122|->         key->data[i * 2 + 1] = ((k[i + 16]) + 16) & 0x1f;
#  123|       }
#  124|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_env.c: scope_hint: In function 'cms_RecipientInfo_ktri_encrypt'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_env.c:551:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_env.c:17: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_env.c:545:13: note: in expansion of macro 'FIPS_mode'
#  549|       }
#  550|   
#  551|->     if (EVP_PKEY_encrypt(pctx, NULL, &eklen, ec->key, ec->keylen) <= 0)
#  552|           goto err;
#  553|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/pem.h:22: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:12: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c: scope_hint: In function 'cms_msgSigDigest'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:221:46: warning[-Wanalyzer-null-dereference]: dereference of NULL 'si'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/evp.h:531:65: note: in definition of macro 'EVP_get_digestbynid'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:221:24: note: in expansion of macro 'EVP_get_digestbyobj'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:16: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:272:9: note: in expansion of macro 'sk_CMS_SignerInfo_num'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:305:14: note: in expansion of macro 'sk_CMS_SignerInfo_num'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:310:10: note: in expansion of macro 'sk_CMS_SignerInfo_value'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/evp.h:531:65: note: in definition of macro 'EVP_get_digestbynid'
openssl-3.2.2-build/openssl-3.2.2/crypto/cms/cms_ess.c:221:24: note: in expansion of macro 'EVP_get_digestbyobj'
#  219|                               unsigned char *dig, unsigned int *diglen)
#  220|   {
#  221|->     const EVP_MD *md = EVP_get_digestbyobj(si->digestAlgorithm->algorithm);
#  222|   
#  223|       if (md == NULL)

Error: COMPILER_WARNING (CWE-1164): [#def27]
openssl-3.2.2-build/openssl-3.2.2/crypto/context.c:30:13: warning[-Wunused-function]: 'read_kernel_fips_flag' defined but not used
#   30 | static void read_kernel_fips_flag(void)
#      |             ^~~~~~~~~~~~~~~~~~~~~
#   28|   static int kernel_fips_flag;
#   29|   
#   30|-> static void read_kernel_fips_flag(void)
#   31|   {
#   32|   	char buf[2] = "0";

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
openssl-3.2.2-build/openssl-3.2.2/crypto/dsa/dsa_sign.c: scope_hint: In function 'i2d_DSA_SIG'
openssl-3.2.2-build/openssl-3.2.2/crypto/dsa/dsa_sign.c:108:42: warning[-Wanalyzer-null-dereference]: dereference of NULL 'buf'
#  106|       if (ppout != NULL) {
#  107|           if (*ppout == NULL) {
#  108|->             *ppout = (unsigned char *)buf->data;
#  109|               buf->data = NULL;
#  110|               BUF_MEM_free(buf);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def29]
openssl-3.2.2-build/openssl-3.2.2/crypto/dsa/dsa_sign.c: scope_hint: In function 'DSA_verify'
openssl-3.2.2-build/openssl-3.2.2/crypto/dsa/dsa_sign.c:210:29: warning[-Wanalyzer-null-argument]: use of NULL 'der' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/include/internal/common.h:15: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/cryptlib.h:21: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/dsa/dsa_sign.c:17: included_from: Included from here.
/usr/include/string.h:64:12: note: argument 2 of 'memcmp' must be non-null
#  208|       /* Ensure signature uses DER and doesn't have trailing garbage */
#  209|       derlen = i2d_DSA_SIG(s, &der);
#  210|->     if (derlen != siglen || memcmp(sigbuf, der, derlen))
#  211|           goto err;
#  212|       ret = DSA_do_verify(dgst, dgst_len, s, dsa);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def30]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/curve448/arch_64/f_impl.h:49:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'd[0].limb[7]'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/curve448/curve448.c: scope_hint: In function 'point_double_internal'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/curve448/curve448.c:68:5: note: in expansion of macro 'gf_add_nr'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/curve448/arch_64/f_impl.h: scope_hint: In function 'point_double_internal'
#   47|   {
#   48|       uint64_t mask = (1ULL << 56) - 1;
#   49|->     uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
#   50|       unsigned int i;
#   51|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ec_asn1.c: scope_hint: In function 'i2d_ECDSA_SIG'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ec_asn1.c:1280:42: warning[-Wanalyzer-null-dereference]: dereference of NULL 'buf'
# 1278|       if (ppout != NULL) {
# 1279|           if (*ppout == NULL) {
# 1280|->             *ppout = (unsigned char *)buf->data;
# 1281|               buf->data = NULL;
# 1282|               BUF_MEM_free(buf);

Error: COMPILER_WARNING (CWE-563): [#def32]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ec_lib.c: scope_hint: In function 'EC_GROUP_new_from_params'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ec_lib.c:1556:9: warning[-Wunused-variable]: unused variable 'encoding_flag'
# 1556 |     int encoding_flag = -1;
#      |         ^~~~~~~~~~~~~
# 1554|       BN_CTX *bnctx = NULL;
# 1555|       const unsigned char *buf = NULL;
# 1556|->     int encoding_flag = -1;
# 1557|   #endif
# 1558|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def33]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistp384.c: scope_hint: In function 'felem_square_ref'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistp384.c:380:40: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'inx2[1]'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistp384.c:731:5: note: in expansion of macro 'felem_square'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistp384.c: scope_hint: In function 'felem_square_ref'
#  378|       out[0] = ((uint128_t) in[0]) * in[0];
#  379|   
#  380|->     out[1] = ((uint128_t) in[0]) * inx2[1];
#  381|   
#  382|       out[2] = ((uint128_t) in[0]) * inx2[2]

Error: CPPCHECK_WARNING (CWE-823): [#def34]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:179: error[arrayIndexOutOfBounds]: Array 'dst[4]' accessed at index 4, which is out of bounds.
#  177|       dst[3] = (src[3] & mask1) ^ (dst[3] & mask2);
#  178|       if (P256_LIMBS == 8) {
#  179|->         dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
#  180|           dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|           dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);

Error: CPPCHECK_WARNING (CWE-823): [#def35]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:179: error[arrayIndexOutOfBounds]: Array 'src[4]' accessed at index 4, which is out of bounds.
#  177|       dst[3] = (src[3] & mask1) ^ (dst[3] & mask2);
#  178|       if (P256_LIMBS == 8) {
#  179|->         dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
#  180|           dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|           dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);

Error: CPPCHECK_WARNING (CWE-823): [#def36]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:180: error[arrayIndexOutOfBounds]: Array 'dst[4]' accessed at index 5, which is out of bounds.
#  178|       if (P256_LIMBS == 8) {
#  179|           dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
#  180|->         dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|           dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
#  182|           dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);

Error: CPPCHECK_WARNING (CWE-823): [#def37]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:180: error[arrayIndexOutOfBounds]: Array 'src[4]' accessed at index 5, which is out of bounds.
#  178|       if (P256_LIMBS == 8) {
#  179|           dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
#  180|->         dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|           dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
#  182|           dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);

Error: CPPCHECK_WARNING (CWE-823): [#def38]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:181: error[arrayIndexOutOfBounds]: Array 'dst[4]' accessed at index 6, which is out of bounds.
#  179|           dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
#  180|           dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|->         dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
#  182|           dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);
#  183|       }

Error: CPPCHECK_WARNING (CWE-823): [#def39]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:181: error[arrayIndexOutOfBounds]: Array 'src[4]' accessed at index 6, which is out of bounds.
#  179|           dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
#  180|           dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|->         dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
#  182|           dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);
#  183|       }

Error: CPPCHECK_WARNING (CWE-823): [#def40]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:182: error[arrayIndexOutOfBounds]: Array 'dst[4]' accessed at index 7, which is out of bounds.
#  180|           dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|           dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
#  182|->         dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);
#  183|       }
#  184|   }

Error: CPPCHECK_WARNING (CWE-823): [#def41]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:182: error[arrayIndexOutOfBounds]: Array 'src[4]' accessed at index 7, which is out of bounds.
#  180|           dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
#  181|           dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
#  182|->         dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);
#  183|       }
#  184|   }

Error: CPPCHECK_WARNING (CWE-823): [#def42]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:204: error[arrayIndexOutOfBounds]: Array 'a[4]' accessed at index 4, which is out of bounds.
#  202|       res |= a[3] ^ b[3];
#  203|       if (P256_LIMBS == 8) {
#  204|->         res |= a[4] ^ b[4];
#  205|           res |= a[5] ^ b[5];
#  206|           res |= a[6] ^ b[6];

Error: CPPCHECK_WARNING (CWE-823): [#def43]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:204: error[arrayIndexOutOfBounds]: Array 'b[4]' accessed at index 4, which is out of bounds.
#  202|       res |= a[3] ^ b[3];
#  203|       if (P256_LIMBS == 8) {
#  204|->         res |= a[4] ^ b[4];
#  205|           res |= a[5] ^ b[5];
#  206|           res |= a[6] ^ b[6];

Error: CPPCHECK_WARNING (CWE-823): [#def44]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:205: error[arrayIndexOutOfBounds]: Array 'a[4]' accessed at index 5, which is out of bounds.
#  203|       if (P256_LIMBS == 8) {
#  204|           res |= a[4] ^ b[4];
#  205|->         res |= a[5] ^ b[5];
#  206|           res |= a[6] ^ b[6];
#  207|           res |= a[7] ^ b[7];

Error: CPPCHECK_WARNING (CWE-823): [#def45]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:205: error[arrayIndexOutOfBounds]: Array 'b[4]' accessed at index 5, which is out of bounds.
#  203|       if (P256_LIMBS == 8) {
#  204|           res |= a[4] ^ b[4];
#  205|->         res |= a[5] ^ b[5];
#  206|           res |= a[6] ^ b[6];
#  207|           res |= a[7] ^ b[7];

Error: CPPCHECK_WARNING (CWE-823): [#def46]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:206: error[arrayIndexOutOfBounds]: Array 'a[4]' accessed at index 6, which is out of bounds.
#  204|           res |= a[4] ^ b[4];
#  205|           res |= a[5] ^ b[5];
#  206|->         res |= a[6] ^ b[6];
#  207|           res |= a[7] ^ b[7];
#  208|       }

Error: CPPCHECK_WARNING (CWE-823): [#def47]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:206: error[arrayIndexOutOfBounds]: Array 'b[4]' accessed at index 6, which is out of bounds.
#  204|           res |= a[4] ^ b[4];
#  205|           res |= a[5] ^ b[5];
#  206|->         res |= a[6] ^ b[6];
#  207|           res |= a[7] ^ b[7];
#  208|       }

Error: CPPCHECK_WARNING (CWE-823): [#def48]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:207: error[arrayIndexOutOfBounds]: Array 'a[4]' accessed at index 7, which is out of bounds.
#  205|           res |= a[5] ^ b[5];
#  206|           res |= a[6] ^ b[6];
#  207|->         res |= a[7] ^ b[7];
#  208|       }
#  209|   

Error: CPPCHECK_WARNING (CWE-823): [#def49]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:207: error[arrayIndexOutOfBounds]: Array 'b[4]' accessed at index 7, which is out of bounds.
#  205|           res |= a[5] ^ b[5];
#  206|           res |= a[6] ^ b[6];
#  207|->         res |= a[7] ^ b[7];
#  208|       }
#  209|   

Error: CPPCHECK_WARNING (CWE-823): [#def50]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:224: error[arrayIndexOutOfBounds]: Array 'ONE[4]' accessed at index 4, which is out of bounds.
#  222|           res |= a[3] ^ ONE[3];
#  223|           if (P256_LIMBS == 8) {
#  224|->             res |= a[4] ^ ONE[4];
#  225|               res |= a[5] ^ ONE[5];
#  226|               res |= a[6] ^ ONE[6];

Error: CPPCHECK_WARNING (CWE-823): [#def51]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:225: error[arrayIndexOutOfBounds]: Array 'ONE[4]' accessed at index 5, which is out of bounds.
#  223|           if (P256_LIMBS == 8) {
#  224|               res |= a[4] ^ ONE[4];
#  225|->             res |= a[5] ^ ONE[5];
#  226|               res |= a[6] ^ ONE[6];
#  227|               /*

Error: CPPCHECK_WARNING (CWE-823): [#def52]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:226: error[arrayIndexOutOfBounds]: Array 'ONE[4]' accessed at index 6, which is out of bounds.
#  224|               res |= a[4] ^ ONE[4];
#  225|               res |= a[5] ^ ONE[5];
#  226|->             res |= a[6] ^ ONE[6];
#  227|               /*
#  228|                * no check for a[7] (being zero) on 32-bit platforms,

Error: GCC_ANALYZER_WARNING (CWE-121): [#def53]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c: scope_hint: In function 'ecp_nistz256_points_mul'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1032:30: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1032:30: note: write of 1 byte to beyond the end of 'p_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1032:30: note: valid subscripts for 'p_str' are '[0]' to '[32]'
# 1030|   
# 1031|                   p_str[i + 0] = (unsigned char)d;
# 1032|->                 p_str[i + 1] = (unsigned char)(d >> 8);
# 1033|                   p_str[i + 2] = (unsigned char)(d >> 16);
# 1034|                   p_str[i + 3] = (unsigned char)(d >>= 24);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def54]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1033:30: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1033:30: note: write of 1 byte to beyond the end of 'p_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1033:30: note: valid subscripts for 'p_str' are '[0]' to '[32]'
# 1031|                   p_str[i + 0] = (unsigned char)d;
# 1032|                   p_str[i + 1] = (unsigned char)(d >> 8);
# 1033|->                 p_str[i + 2] = (unsigned char)(d >> 16);
# 1034|                   p_str[i + 3] = (unsigned char)(d >>= 24);
# 1035|                   if (BN_BYTES == 8) {

Error: GCC_ANALYZER_WARNING (CWE-121): [#def55]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1034:30: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1034:30: note: write of 1 byte to beyond the end of 'p_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1034:30: note: valid subscripts for 'p_str' are '[0]' to '[32]'
# 1032|                   p_str[i + 1] = (unsigned char)(d >> 8);
# 1033|                   p_str[i + 2] = (unsigned char)(d >> 16);
# 1034|->                 p_str[i + 3] = (unsigned char)(d >>= 24);
# 1035|                   if (BN_BYTES == 8) {
# 1036|                       d >>= 8;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def56]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1037:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1037:34: note: write of 1 byte to beyond the end of 'p_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1037:34: note: valid subscripts for 'p_str' are '[0]' to '[32]'
# 1035|                   if (BN_BYTES == 8) {
# 1036|                       d >>= 8;
# 1037|->                     p_str[i + 4] = (unsigned char)d;
# 1038|                       p_str[i + 5] = (unsigned char)(d >> 8);
# 1039|                       p_str[i + 6] = (unsigned char)(d >> 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def57]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1038:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1038:34: note: write of 1 byte to beyond the end of 'p_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1038:34: note: valid subscripts for 'p_str' are '[0]' to '[32]'
# 1036|                       d >>= 8;
# 1037|                       p_str[i + 4] = (unsigned char)d;
# 1038|->                     p_str[i + 5] = (unsigned char)(d >> 8);
# 1039|                       p_str[i + 6] = (unsigned char)(d >> 16);
# 1040|                       p_str[i + 7] = (unsigned char)(d >> 24);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def58]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1039:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1039:34: note: write of 1 byte to beyond the end of 'p_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1039:34: note: valid subscripts for 'p_str' are '[0]' to '[32]'
# 1037|                       p_str[i + 4] = (unsigned char)d;
# 1038|                       p_str[i + 5] = (unsigned char)(d >> 8);
# 1039|->                     p_str[i + 6] = (unsigned char)(d >> 16);
# 1040|                       p_str[i + 7] = (unsigned char)(d >> 24);
# 1041|                   }

Error: GCC_ANALYZER_WARNING (CWE-121): [#def59]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1040:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1040:34: note: write of 1 byte to beyond the end of 'p_str'
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1040:34: note: valid subscripts for 'p_str' are '[0]' to '[32]'
# 1038|                       p_str[i + 5] = (unsigned char)(d >> 8);
# 1039|                       p_str[i + 6] = (unsigned char)(d >> 16);
# 1040|->                     p_str[i + 7] = (unsigned char)(d >> 24);
# 1041|                   }
# 1042|               }

Error: CPPCHECK_WARNING (CWE-823): [#def60]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1067: error[arrayIndexOutOfBounds]: Array 'p.p.X[4]' accessed at index 4, which is out of bounds.
# 1065|                        p.p.Y[0] | p.p.Y[1] | p.p.Y[2] | p.p.Y[3]);
# 1066|               if (P256_LIMBS == 8)
# 1067|->                 infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|                             p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   

Error: CPPCHECK_WARNING (CWE-823): [#def61]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1067: error[arrayIndexOutOfBounds]: Array 'p.p.X[4]' accessed at index 5, which is out of bounds.
# 1065|                        p.p.Y[0] | p.p.Y[1] | p.p.Y[2] | p.p.Y[3]);
# 1066|               if (P256_LIMBS == 8)
# 1067|->                 infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|                             p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   

Error: CPPCHECK_WARNING (CWE-823): [#def62]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1067: error[arrayIndexOutOfBounds]: Array 'p.p.X[4]' accessed at index 6, which is out of bounds.
# 1065|                        p.p.Y[0] | p.p.Y[1] | p.p.Y[2] | p.p.Y[3]);
# 1066|               if (P256_LIMBS == 8)
# 1067|->                 infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|                             p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   

Error: CPPCHECK_WARNING (CWE-823): [#def63]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1067: error[arrayIndexOutOfBounds]: Array 'p.p.X[4]' accessed at index 7, which is out of bounds.
# 1065|                        p.p.Y[0] | p.p.Y[1] | p.p.Y[2] | p.p.Y[3]);
# 1066|               if (P256_LIMBS == 8)
# 1067|->                 infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|                             p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   

Error: CPPCHECK_WARNING (CWE-823): [#def64]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1068: error[arrayIndexOutOfBounds]: Array 'p.p.Y[4]' accessed at index 4, which is out of bounds.
# 1066|               if (P256_LIMBS == 8)
# 1067|                   infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|->                           p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   
# 1070|               infty = 0 - is_zero(infty);

Error: CPPCHECK_WARNING (CWE-823): [#def65]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1068: error[arrayIndexOutOfBounds]: Array 'p.p.Y[4]' accessed at index 5, which is out of bounds.
# 1066|               if (P256_LIMBS == 8)
# 1067|                   infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|->                           p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   
# 1070|               infty = 0 - is_zero(infty);

Error: CPPCHECK_WARNING (CWE-823): [#def66]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1068: error[arrayIndexOutOfBounds]: Array 'p.p.Y[4]' accessed at index 6, which is out of bounds.
# 1066|               if (P256_LIMBS == 8)
# 1067|                   infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|->                           p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   
# 1070|               infty = 0 - is_zero(infty);

Error: CPPCHECK_WARNING (CWE-823): [#def67]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1068: error[arrayIndexOutOfBounds]: Array 'p.p.Y[4]' accessed at index 7, which is out of bounds.
# 1066|               if (P256_LIMBS == 8)
# 1067|                   infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] |
# 1068|->                           p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
# 1069|   
# 1070|               infty = 0 - is_zero(infty);

Error: CPPCHECK_WARNING (CWE-823): [#def68]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1078: error[arrayIndexOutOfBounds]: Array 'ONE[4]' accessed at index 4, which is out of bounds.
# 1076|               p.p.Z[3] = ONE[3] & infty;
# 1077|               if (P256_LIMBS == 8) {
# 1078|->                 p.p.Z[4] = ONE[4] & infty;
# 1079|                   p.p.Z[5] = ONE[5] & infty;
# 1080|                   p.p.Z[6] = ONE[6] & infty;

Error: CPPCHECK_WARNING (CWE-823): [#def69]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1078: error[arrayIndexOutOfBounds]: Array 'p.p.Z[4]' accessed at index 4, which is out of bounds.
# 1076|               p.p.Z[3] = ONE[3] & infty;
# 1077|               if (P256_LIMBS == 8) {
# 1078|->                 p.p.Z[4] = ONE[4] & infty;
# 1079|                   p.p.Z[5] = ONE[5] & infty;
# 1080|                   p.p.Z[6] = ONE[6] & infty;

Error: CPPCHECK_WARNING (CWE-823): [#def70]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1079: error[arrayIndexOutOfBounds]: Array 'ONE[4]' accessed at index 5, which is out of bounds.
# 1077|               if (P256_LIMBS == 8) {
# 1078|                   p.p.Z[4] = ONE[4] & infty;
# 1079|->                 p.p.Z[5] = ONE[5] & infty;
# 1080|                   p.p.Z[6] = ONE[6] & infty;
# 1081|                   p.p.Z[7] = ONE[7] & infty;

Error: CPPCHECK_WARNING (CWE-823): [#def71]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1079: error[arrayIndexOutOfBounds]: Array 'p.p.Z[4]' accessed at index 5, which is out of bounds.
# 1077|               if (P256_LIMBS == 8) {
# 1078|                   p.p.Z[4] = ONE[4] & infty;
# 1079|->                 p.p.Z[5] = ONE[5] & infty;
# 1080|                   p.p.Z[6] = ONE[6] & infty;
# 1081|                   p.p.Z[7] = ONE[7] & infty;

Error: CPPCHECK_WARNING (CWE-823): [#def72]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1080: error[arrayIndexOutOfBounds]: Array 'ONE[4]' accessed at index 6, which is out of bounds.
# 1078|                   p.p.Z[4] = ONE[4] & infty;
# 1079|                   p.p.Z[5] = ONE[5] & infty;
# 1080|->                 p.p.Z[6] = ONE[6] & infty;
# 1081|                   p.p.Z[7] = ONE[7] & infty;
# 1082|               }

Error: CPPCHECK_WARNING (CWE-823): [#def73]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1080: error[arrayIndexOutOfBounds]: Array 'p.p.Z[4]' accessed at index 6, which is out of bounds.
# 1078|                   p.p.Z[4] = ONE[4] & infty;
# 1079|                   p.p.Z[5] = ONE[5] & infty;
# 1080|->                 p.p.Z[6] = ONE[6] & infty;
# 1081|                   p.p.Z[7] = ONE[7] & infty;
# 1082|               }

Error: CPPCHECK_WARNING (CWE-823): [#def74]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1081: error[arrayIndexOutOfBounds]: Array 'ONE[4]' accessed at index 7, which is out of bounds.
# 1079|                   p.p.Z[5] = ONE[5] & infty;
# 1080|                   p.p.Z[6] = ONE[6] & infty;
# 1081|->                 p.p.Z[7] = ONE[7] & infty;
# 1082|               }
# 1083|   

Error: CPPCHECK_WARNING (CWE-823): [#def75]
openssl-3.2.2-build/openssl-3.2.2/crypto/ec/ecp_nistz256.c:1081: error[arrayIndexOutOfBounds]: Array 'p.p.Z[4]' accessed at index 7, which is out of bounds.
# 1079|                   p.p.Z[5] = ONE[5] & infty;
# 1080|                   p.p.Z[6] = ONE[6] & infty;
# 1081|->                 p.p.Z[7] = ONE[7] & infty;
# 1082|               }
# 1083|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def76]
openssl-3.2.2-build/openssl-3.2.2/crypto/encode_decode/decoder_lib.c:1000:25: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
openssl-3.2.2-build/openssl-3.2.2/crypto/encode_decode/decoder_lib.c:851:16: note: in expansion of macro 'BIO_tell'
#  998|           new_data.flag_input_structure_checked
#  999|               = data->flag_input_structure_checked;
# 1000|->         ok = new_decoder->decode(new_decoderctx, cbio,
# 1001|                                    new_data.ctx->selection,
# 1002|                                    decoder_process, &new_data,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def77]
openssl-3.2.2-build/openssl-3.2.2/crypto/encode_decode/decoder_lib.c: scope_hint: In function 'decoder_process'
openssl-3.2.2-build/openssl-3.2.2/crypto/encode_decode/decoder_lib.c:1000:25: warning[-Wanalyzer-null-dereference]: dereference of NULL 'decoder'
openssl-3.2.2-build/openssl-3.2.2/crypto/encode_decode/decoder_lib.c:11: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/encode_decode/decoder_lib.c:851:16: note: in expansion of macro 'BIO_tell'
#  998|           new_data.flag_input_structure_checked
#  999|               = data->flag_input_structure_checked;
# 1000|->         ok = new_decoder->decode(new_decoderctx, cbio,
# 1001|                                    new_data.ctx->selection,
# 1002|                                    decoder_process, &new_data,

Error: GCC_ANALYZER_WARNING (CWE-835): [#def78]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/bio_ok.c: scope_hint: In function 'ok_ctrl'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/bio_ok.c:361:19: warning[-Wanalyzer-infinite-loop]: infinite loop
#  359|                   return 0;
#  360|   
#  361|->         while (ctx->blockout) {
#  362|               i = ok_write(b, NULL, 0);
#  363|               if (i < 0) {

Error: CPPCHECK_WARNING (CWE-562): [#def79]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/ctrl_params_translate.c:1163: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1161|            */
# 1162|           p2 = ctx->name_buf;
# 1163|->         ctx->p2 = &p2;
# 1164|           ctx->sz = sizeof(ctx->name_buf);
# 1165|       }

Error: CPPCHECK_WARNING (CWE-457): [#def80]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:184: error[legacyUninitvar]: Uninitialized variable: blocks[0].c
#  182|   
#  183|       /* ask for IVs in bulk */
#  184|->     if (RAND_bytes((IVs = blocks[0].c), 16 * x4) <= 0)
#  185|           return 0;
#  186|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def81]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c: scope_hint: In function 'tls1_1_multi_block_encrypt'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:208:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:208:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:208:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  206|   
#  207|       for (i = 1; i < x4; i++) {
#  208|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  209|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  210|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def82]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:208:39: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:208:39: note: write of 8 bytes to beyond the end of 'hash_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:208:39: note: valid subscripts for 'hash_d' are '[0]' to '[7]'
#  206|   
#  207|       for (i = 1; i < x4; i++) {
#  208|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  209|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  210|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def83]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:209:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:209:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:209:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  207|       for (i = 1; i < x4; i++) {
#  208|           ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  209|->         ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  210|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  211|           memcpy(ciph_d[i].iv, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def84]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:211:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:211:9: note: write of 16 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:211:9: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  209|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  210|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  211|->         memcpy(ciph_d[i].iv, IVs, 16);
#  212|           IVs += 16;
#  213|       }

Error: CPPCHECK_WARNING (CWE-758): [#def85]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:715: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  713|                       c = p[j];
#  714|                       cmask =
#  715|->                         ((int)(j - off - SHA_DIGEST_LENGTH)) >> (sizeof(int) *
#  716|                                                                    8 - 1);
#  717|                       res |= (c ^ pad) & ~cmask; /* ... and padding */

Error: CPPCHECK_WARNING (CWE-758): [#def86]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha1.c:718: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  716|                                                                    8 - 1);
#  717|                       res |= (c ^ pad) & ~cmask; /* ... and padding */
#  718|->                     cmask &= ((int)(off - 1 - j)) >> (sizeof(int) * 8 - 1);
#  719|                       res |= (c ^ pmac->c[i]) & cmask;
#  720|                       i += 1 & cmask;

Error: CPPCHECK_WARNING (CWE-457): [#def87]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:178: error[legacyUninitvar]: Uninitialized variable: blocks[0].c
#  176|   
#  177|       /* ask for IVs in bulk */
#  178|->     if (RAND_bytes((IVs = blocks[0].c), 16 * x4) <= 0)
#  179|           return 0;
#  180|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def88]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c: scope_hint: In function 'tls1_1_multi_block_encrypt'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:203:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:203:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:203:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  201|   
#  202|       for (i = 1; i < x4; i++) {
#  203|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  204|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  205|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def89]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:203:39: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:203:39: note: write of 8 bytes to beyond the end of 'hash_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:203:39: note: valid subscripts for 'hash_d' are '[0]' to '[7]'
#  201|   
#  202|       for (i = 1; i < x4; i++) {
#  203|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  204|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  205|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def90]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:204:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:204:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:204:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  202|       for (i = 1; i < x4; i++) {
#  203|           ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  204|->         ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  205|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  206|           memcpy(ciph_d[i].iv, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def91]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:206:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:206:9: note: write of 16 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:206:9: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  204|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  205|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  206|->         memcpy(ciph_d[i].iv, IVs, 16);
#  207|           IVs += 16;
#  208|       }

Error: CPPCHECK_WARNING (CWE-758): [#def92]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:713: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  711|                       c = p[j];
#  712|                       cmask =
#  713|->                         ((int)(j - off - SHA256_DIGEST_LENGTH)) >>
#  714|                           (sizeof(int) * 8 - 1);
#  715|                       res |= (c ^ pad) & ~cmask; /* ... and padding */

Error: CPPCHECK_WARNING (CWE-758): [#def93]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/e_aes_cbc_hmac_sha256.c:716: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  714|                           (sizeof(int) * 8 - 1);
#  715|                       res |= (c ^ pad) & ~cmask; /* ... and padding */
#  716|->                     cmask &= ((int)(off - 1 - j)) >> (sizeof(int) * 8 - 1);
#  717|                       res |= (c ^ pmac->c[i]) & cmask;
#  718|                       i += 1 & cmask;

Error: CPPCHECK_WARNING (CWE-758): [#def94]
openssl-3.2.2-build/openssl-3.2.2/crypto/evp/evp_enc.c:31: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   29|   #include "evp_local.h"
#   30|   
#   31|-> OSSL_SAFE_MATH_SIGNED(int, int)
#   32|   
#   33|   int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)

Error: COMPILER_WARNING (CWE-590): [#def95]
openssl-3.2.2-build/openssl-3.2.2/crypto/mem.c:282:5: warning[-Wfree-nonheap-object]: 'free' called on unallocated object 'recp'
#  282 |     free(str);
#      |     ^
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_exp.c: scope_hint: In function 'BN_mod_exp_recp'
openssl-3.2.2-build/openssl-3.2.2/crypto/bn/bn_exp.c:177:17: note: declared here
#  177 |     BN_RECP_CTX recp;
#      |                 ^
#  280|       }
#  281|   
#  282|->     free(str);
#  283|   }
#  284|   

Error: CPPCHECK_WARNING (CWE-758): [#def96]
openssl-3.2.2-build/openssl-3.2.2/crypto/modes/xts128.c:74: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   72|               unsigned int carry, res;
#   73|   
#   74|->             res = 0x87 & (((int)tweak.d[3]) >> 31);
#   75|               carry = (unsigned int)(tweak.u[0] >> 63);
#   76|               tweak.u[0] = (tweak.u[0] << 1) ^ res;

Error: CPPCHECK_WARNING (CWE-758): [#def97]
openssl-3.2.2-build/openssl-3.2.2/crypto/modes/xts128.c:113: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  111|               unsigned int carry, res;
#  112|   
#  113|->             res = 0x87 & (((int)tweak.d[3]) >> 31);
#  114|               carry = (unsigned int)(tweak.u[0] >> 63);
#  115|               tweak1.u[0] = (tweak.u[0] << 1) ^ res;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def98]
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c: scope_hint: In function 'param_bld_convert'
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c:356:31: warning[-Wanalyzer-null-dereference]: dereference of NULL 'p'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/bio.h:30: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/openssl/err.h:29: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c:12: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c:393:14: note: in expansion of macro 'OPENSSL_malloc'
#  354|                      || pd->type == OSSL_PARAM_UTF8_PTR) {
#  355|               /* PTR */
#  356|->             *(const void **)p = pd->string;
#  357|           } else if (pd->type == OSSL_PARAM_OCTET_STRING
#  358|                      || pd->type == OSSL_PARAM_UTF8_STRING) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def99]
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c:368:17: warning[-Wanalyzer-null-argument]: use of NULL 'p' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c:393:14: note: in expansion of macro 'OPENSSL_malloc'
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
#  366|               /* Number, but could also be a NULL BIGNUM */
#  367|               if (pd->size > sizeof(pd->num))
#  368|->                 memset(p, 0, pd->size);
#  369|               else if (pd->size > 0)
#  370|                   memcpy(p, &pd->num, pd->size);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def100]
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c:370:17: warning[-Wanalyzer-null-argument]: use of NULL 'p' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/crypto/param_build.c:393:14: note: in expansion of macro 'OPENSSL_malloc'
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
#  368|                   memset(p, 0, pd->size);
#  369|               else if (pd->size > 0)
#  370|->                 memcpy(p, &pd->num, pd->size);
#  371|           }
#  372|       }

Error: COMPILER_WARNING (CWE-1164): [#def101]
openssl-3.2.2-build/openssl-3.2.2/crypto/rand/rand_lib.c:534:22: warning[-Wunused-function]: 'rand_new_seed' defined but not used
#  534 | static EVP_RAND_CTX *rand_new_seed(OSSL_LIB_CTX *libctx)
#      |                      ^~~~~~~~~~~~~
#  532|   
#  533|   #ifndef FIPS_MODULE
#  534|-> static EVP_RAND_CTX *rand_new_seed(OSSL_LIB_CTX *libctx)
#  535|   {
#  536|       EVP_RAND *rand;

Error: CPPCHECK_WARNING (CWE-758): [#def102]
openssl-3.2.2-build/openssl-3.2.2/crypto/stack/stack.c:18: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   16|   #include <openssl/e_os2.h>      /* For ossl_inline */
#   17|   
#   18|-> OSSL_SAFE_MATH_SIGNED(int, int)
#   19|   
#   20|   /*

Error: COMPILER_WARNING: [#def103]
openssl-3.2.2-build/openssl-3.2.2/crypto/thread/arch/thread_posix.c:13:10: warning: "_GNU_SOURCE" redefined
#   13 | # define _GNU_SOURCE
#      |          ^~~~~~~~~~~
<command-line>: note: this is the location of the previous definition
#   11|   
#   12|   #if defined(OPENSSL_THREADS_POSIX)
#   13|-> # define _GNU_SOURCE
#   14|   # include <errno.h>
#   15|   # include <sys/types.h>

Error: COMPILER_WARNING: [#def104]
openssl-3.2.2-build/openssl-3.2.2/crypto/thread/arch/thread_posix.c:13:10: warning: '_GNU_SOURCE' redefined
<command-line>: note: this is the location of the previous definition
#   11|   
#   12|   #if defined(OPENSSL_THREADS_POSIX)
#   13|-> # define _GNU_SOURCE
#   14|   # include <errno.h>
#   15|   # include <sys/types.h>

Error: CPPCHECK_WARNING (CWE-758): [#def105]
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/v3_ncons.c:24: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   22|   #include "ext_dat.h"
#   23|   
#   24|-> OSSL_SAFE_MATH_SIGNED(int, int)
#   25|   
#   26|   static void *v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method,

Error: GCC_ANALYZER_WARNING (CWE-688): [#def106]
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509_vfy.c: scope_hint: In function 'dane_match_cert'
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509_vfy.c:2934:13: warning[-Wanalyzer-null-argument]: use of NULL 'cmpbuf' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/include/internal/common.h:15: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/cryptlib.h:21: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509_vfy.c:18: included_from: Included from here.
/usr/include/string.h:64:12: note: argument 1 of 'memcmp' must be non-null
# 2932|            */
# 2933|           if (cmplen == t->dlen &&
# 2934|->             memcmp(cmpbuf, t->data, cmplen) == 0) {
# 2935|               if (DANETLS_USAGE_BIT(usage) & DANETLS_DANE_MASK)
# 2936|                   matched = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def107]
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509name.c: scope_hint: In function 'X509_NAME_get_text_by_OBJ'
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509name.c:41:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#   39|       data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i));
#   40|       if (buf == NULL)
#   41|->         return data->length;
#   42|       if (len <= 0)
#   43|           return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def108]
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509name.c:44:14: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#   42|       if (len <= 0)
#   43|           return 0;
#   44|->     i = (data->length > (len - 1)) ? (len - 1) : data->length;
#   45|       memcpy(buf, data->data, i);
#   46|       buf[i] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-775): [#def109]
openssl-3.2.2-build/openssl-3.2.2/fuzz/test-corpus.c: scope_hint: In function 'testfile'
openssl-3.2.2-build/openssl-3.2.2/fuzz/test-corpus.c:51:20: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pathname, "rb")'
#   49|       if (f == NULL)
#   50|           return;
#   51|->     buf = malloc(st.st_size);
#   52|       if (buf != NULL) {
#   53|           s = fread(buf, 1, st.st_size, f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
openssl-3.2.2-build/openssl-3.2.2/fuzz/test-corpus.c:51:20: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pathname, "rb")'
#   49|       if (f == NULL)
#   50|           return;
#   51|->     buf = malloc(st.st_size);
#   52|       if (buf != NULL) {
#   53|           s = fread(buf, 1, st.st_size, f);

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def111]
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509_vfy.c:27: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/dane.h:82:32: warning[-Wanalyzer-shift-count-overflow]: shift by count ('256') >= precision of type ('32')
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509_vfy.c:2935:17: note: in expansion of macro 'DANETLS_USAGE_BIT'
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509_vfy.c:2935:17: note: in expansion of macro 'DANETLS_USAGE_BIT'
openssl-3.2.2-build/openssl-3.2.2/crypto/x509/x509_vfy.c:2935:17: note: in expansion of macro 'DANETLS_USAGE_BIT'
#   80|       ((dane) != NULL && sk_danetls_record_num((dane)->trecs) > 0)
#   81|   
#   82|-> #define DANETLS_USAGE_BIT(u)   (((uint32_t)1) << u)
#   83|   
#   84|   #define DANETLS_PKIX_TA_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_PKIX_TA))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def112]
openssl-3.2.2-build/openssl-3.2.2/crypto/bio/bss_conn.c:15: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/ktls.h: scope_hint: In function 'ktls_read_record'
openssl-3.2.2-build/openssl-3.2.2/include/internal/ktls.h:416:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cmsg'
/usr/include/sys/socket.h:33: included_from: Included from here.
/usr/include/netinet/in.h:23: included_from: Included from here.
/usr/include/netdb.h:27: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/sockets.h:91: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/bio/bio_local.h:11: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/crypto/bio/bss_conn.c:13: included_from: Included from here.
#  414|       if (msg.msg_controllen > 0) {
#  415|           cmsg = CMSG_FIRSTHDR(&msg);
#  416|->         if (cmsg->cmsg_type == TLS_GET_RECORD_TYPE) {
#  417|               p[0] = *((unsigned char *)CMSG_DATA(cmsg));
#  418|               p[1] = TLS1_2_VERSION_MAJOR;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def113]
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c:14: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c: scope_hint: In function 'ossl_list_txe_remove'
openssl-3.2.2-build/openssl-3.2.2/include/internal/list.h:95:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'list'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c:41:1: note: in expansion of macro 'DEFINE_LIST_OF'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c: scope_hint: In function 'ossl_list_txe_remove'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c:41:1: note: in expansion of macro 'DEFINE_LIST_OF'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c: scope_hint: In function 'ossl_list_txe_remove'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c:41:1: note: in expansion of macro 'DEFINE_LIST_OF'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c:41:1: note: in expansion of macro 'DEFINE_LIST_OF'
#   93|           assert(elem->ossl_list_ ## name.list == list);                      \
#   94|           OSSL_LIST_DBG(elem->ossl_list_ ## name.list = NULL)                 \
#   95|->         if (list->alpha == elem)                                            \
#   96|               list->alpha = elem->ossl_list_ ## name.next;                    \
#   97|           if (list->omega == elem)                                            \

Error: CPPCHECK_WARNING (CWE-457): [#def114]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/asn1.h:234: warning[uninitvar]: Uninitialized variables: ptr.minsize, ptr.maxsize, ptr.mask, ptr.flags
#  232|   };
#  233|   
#  234|-> SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING_TABLE, ASN1_STRING_TABLE, ASN1_STRING_TABLE)
#  235|   #define sk_ASN1_STRING_TABLE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
#  236|   #define sk_ASN1_STRING_TABLE_value(sk, idx) ((ASN1_STRING_TABLE *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), (idx)))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def115]
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:22: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c: scope_hint: In function 'ping_pong_query'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/bio.h:202:7: warning[-Wanalyzer-null-dereference]: dereference of NULL 'clientsc'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1085:10: note: in expansion of macro 'BIO_get_ktls_send'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1045:33: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1085:10: note: in expansion of macro 'BIO_get_ktls_send'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1085:10: note: in expansion of macro 'BIO_get_ktls_send'
#  200|   # ifndef OPENSSL_NO_KTLS
#  201|   #  define BIO_get_ktls_send(b)         \
#  202|->      (BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
#  203|   #  define BIO_get_ktls_recv(b)         \
#  204|        (BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def116]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/bio.h:202:7: warning[-Wanalyzer-null-dereference]: dereference of NULL 'serversc'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1095:10: note: in expansion of macro 'BIO_get_ktls_send'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1044:30: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1044:10: note: in expansion of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1045:33: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1085:10: note: in expansion of macro 'BIO_get_ktls_send'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1095:10: note: in expansion of macro 'BIO_get_ktls_send'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1095:10: note: in expansion of macro 'BIO_get_ktls_send'
#  200|   # ifndef OPENSSL_NO_KTLS
#  201|   #  define BIO_get_ktls_send(b)         \
#  202|->      (BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
#  203|   #  define BIO_get_ktls_recv(b)         \
#  204|        (BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)

Error: CPPCHECK_WARNING (CWE-457): [#def117]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/conf.h:70: warning[uninitvar]: Uninitialized variable: ptr.value
#   68|   #define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
#   69|   #define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
#   70|-> DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
#   71|   #define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)))
#   72|   #define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))

Error: GCC_ANALYZER_WARNING (CWE-465): [#def118]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/bio.h:30: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/openssl/err.h:29: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c:27: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c: scope_hint: In function 'opt_init'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/crypto.h:421:5: warning[-Wanalyzer-deref-before-check]: check of 'o' for NULL after already dereferencing it
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c:219:13: note: in expansion of macro 'OPENSSL_assert'
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c:218:13: note: in expansion of macro 'OPENSSL_assert'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/crypto.h:421:13: note: in definition of macro 'OPENSSL_assert'
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c:219:13: note: in expansion of macro 'OPENSSL_assert'
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c:221:13: note: in expansion of macro 'OPENSSL_assert'
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c:218:13: note: in expansion of macro 'OPENSSL_assert'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/crypto.h:421:13: note: in definition of macro 'OPENSSL_assert'
openssl-3.2.2-build/openssl-3.2.2/apps/lib/opt.c:219:13: note: in expansion of macro 'OPENSSL_assert'
#  419|   # endif
#  420|   # define OPENSSL_assert(e) \
#  421|->     (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
#  422|   
#  423|   int OPENSSL_isservice(void);

Error: CPPCHECK_WARNING (CWE-457): [#def119]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/err.h:374: warning[uninitvar]: Uninitialized variable: ptr.string
#  372|   } ERR_STRING_DATA;
#  373|   
#  374|-> DEFINE_LHASH_OF_INTERNAL(ERR_STRING_DATA);
#  375|   #define lh_ERR_STRING_DATA_new(hfn, cmp) ((LHASH_OF(ERR_STRING_DATA) *)OPENSSL_LH_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)))
#  376|   #define lh_ERR_STRING_DATA_free(lh) OPENSSL_LH_free(ossl_check_ERR_STRING_DATA_lh_type(lh))

Error: CPPCHECK_WARNING (CWE-457): [#def120]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/ssl.h:1030: warning[uninitvar]: Uninitialized variables: ptr.name, ptr.method
# 1028|   #define sk_SSL_CIPHER_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_copyfunc_type(copyfunc), ossl_check_SSL_CIPHER_freefunc_type(freefunc)))
# 1029|   #define sk_SSL_CIPHER_set_cmp_func(sk, cmp) ((sk_SSL_CIPHER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_compfunc_type(cmp)))
# 1030|-> SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
# 1031|   #define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
# 1032|   #define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))

Error: CPPCHECK_WARNING (CWE-457): [#def121]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509.h:104: warning[uninitvar]: Uninitialized variables: ptr.revocationDate, ptr.extensions, ptr.issuer, ptr.reason, ptr.sequence
#  102|   #define sk_X509_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_sk_type(sk), ossl_check_X509_copyfunc_type(copyfunc), ossl_check_X509_freefunc_type(freefunc)))
#  103|   #define sk_X509_set_cmp_func(sk, cmp) ((sk_X509_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_sk_type(sk), ossl_check_X509_compfunc_type(cmp)))
#  104|-> SKM_DEFINE_STACK_OF_INTERNAL(X509_REVOKED, X509_REVOKED, X509_REVOKED)
#  105|   #define sk_X509_REVOKED_num(sk) OPENSSL_sk_num(ossl_check_const_X509_REVOKED_sk_type(sk))
#  106|   #define sk_X509_REVOKED_value(sk, idx) ((X509_REVOKED *)OPENSSL_sk_value(ossl_check_const_X509_REVOKED_sk_type(sk), (idx)))

Error: CPPCHECK_WARNING (CWE-457): [#def122]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509_vfy.h:120: warning[uninitvar]: Uninitialized variables: ptr.check_time, ptr.inh_flags, ptr.flags, ptr.purpose, ptr.trust, ptr.depth, ptr.auth_level, ptr.policies, ptr.hosts, ptr.hostflags, ptr.peername, ptr.email, ptr.emaillen, ptr.ip, ptr.iplen
#  118|   #define sk_X509_OBJECT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_OBJECT) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_copyfunc_type(copyfunc), ossl_check_X509_OBJECT_freefunc_type(freefunc)))
#  119|   #define sk_X509_OBJECT_set_cmp_func(sk, cmp) ((sk_X509_OBJECT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_compfunc_type(cmp)))
#  120|-> SKM_DEFINE_STACK_OF_INTERNAL(X509_VERIFY_PARAM, X509_VERIFY_PARAM, X509_VERIFY_PARAM)
#  121|   #define sk_X509_VERIFY_PARAM_num(sk) OPENSSL_sk_num(ossl_check_const_X509_VERIFY_PARAM_sk_type(sk))
#  122|   #define sk_X509_VERIFY_PARAM_value(sk, idx) ((X509_VERIFY_PARAM *)OPENSSL_sk_value(ossl_check_const_X509_VERIFY_PARAM_sk_type(sk), (idx)))

Error: CPPCHECK_WARNING (CWE-457): [#def123]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509_vfy.h:157: warning[uninitvar]: Uninitialized variables: ptr.flags, ptr.check_trust, ptr.name, ptr.arg1, ptr.arg2
#  155|       void *arg2;
#  156|   } X509_TRUST;
#  157|-> SKM_DEFINE_STACK_OF_INTERNAL(X509_TRUST, X509_TRUST, X509_TRUST)
#  158|   #define sk_X509_TRUST_num(sk) OPENSSL_sk_num(ossl_check_const_X509_TRUST_sk_type(sk))
#  159|   #define sk_X509_TRUST_value(sk, idx) ((X509_TRUST *)OPENSSL_sk_value(ossl_check_const_X509_TRUST_sk_type(sk), (idx)))

Error: CPPCHECK_WARNING (CWE-457): [#def124]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509v3.h:707: warning[uninitvar]: Uninitialized variables: ptr.trust, ptr.flags, ptr.check_purpose, ptr.name, ptr.sname, ptr.usr_data
#  705|   } X509_PURPOSE;
#  706|   
#  707|-> SKM_DEFINE_STACK_OF_INTERNAL(X509_PURPOSE, X509_PURPOSE, X509_PURPOSE)
#  708|   #define sk_X509_PURPOSE_num(sk) OPENSSL_sk_num(ossl_check_const_X509_PURPOSE_sk_type(sk))
#  709|   #define sk_X509_PURPOSE_value(sk, idx) ((X509_PURPOSE *)OPENSSL_sk_value(ossl_check_const_X509_PURPOSE_sk_type(sk), (idx)))

Error: CPPCHECK_WARNING (CWE-457): [#def125]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509v3.h:1052: warning[uninitvar]: Uninitialized variables: ptr.parent, ptr.nchild
# 1050|   
# 1051|   void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);
# 1052|-> SKM_DEFINE_STACK_OF_INTERNAL(X509_POLICY_NODE, X509_POLICY_NODE, X509_POLICY_NODE)
# 1053|   #define sk_X509_POLICY_NODE_num(sk) OPENSSL_sk_num(ossl_check_const_X509_POLICY_NODE_sk_type(sk))
# 1054|   #define sk_X509_POLICY_NODE_value(sk, idx) ((X509_POLICY_NODE *)OPENSSL_sk_value(ossl_check_const_X509_POLICY_NODE_sk_type(sk), (idx)))

Error: COMPILER_WARNING (CWE-704): [#def126]
openssl-3.2.2-build/openssl-3.2.2/providers/fips/self_test.c: scope_hint: In function 'SELF_TEST_post'
openssl-3.2.2-build/openssl-3.2.2/providers/fips/self_test.c:521:25: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  521 |         module_checksum = fips_hmac_container;
#      |                         ^
#  519|   
#  520|      if (st->module_checksum_data == NULL) {
#  521|->         module_checksum = fips_hmac_container;
#  522|           checksum_len = sizeof(fips_hmac_container);
#  523|       } else {

Error: COMPILER_WARNING (CWE-563): [#def127]
openssl-3.2.2-build/openssl-3.2.2/providers/fips/self_test_kats.c: scope_hint: In function 'self_test_sign'
openssl-3.2.2-build/openssl-3.2.2/providers/fips/self_test_kats.c:461:32: warning[-Wunused-variable]: unused variable 'dgst'
#  461 |     static const unsigned char dgst[] = {
#      |                                ^~~~
#  459|       unsigned char sig[256];
#  460|       size_t siglen = sizeof(sig);
#  461|->     static const unsigned char dgst[] = {
#  462|           0x7f, 0x83, 0xb1, 0x65, 0x7f, 0xf1, 0xfc, 0x53, 0xb9, 0x2d, 0xc1, 0x81,
#  463|           0x48, 0xa1, 0xd6, 0x5d, 0xfc, 0x2d, 0x4b, 0x1f, 0xa3, 0xd6, 0x77, 0x28,

Error: CPPCHECK_WARNING (CWE-457): [#def128]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:146: error[legacyUninitvar]: Uninitialized variable: blocks[0].c
#  144|   
#  145|       /* ask for IVs in bulk */
#  146|->     if (RAND_bytes_ex(ctx->base.libctx, (IVs = blocks[0].c), 16 * x4, 0) <= 0)
#  147|           return 0;
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def129]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c: scope_hint: In function 'tls1_multi_block_encrypt'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:170:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:170:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:170:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  168|   
#  169|       for (i = 1; i < x4; i++) {
#  170|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  171|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  172|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def130]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:170:39: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:170:39: note: write of 8 bytes to beyond the end of 'hash_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:170:39: note: valid subscripts for 'hash_d' are '[0]' to '[7]'
#  168|   
#  169|       for (i = 1; i < x4; i++) {
#  170|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  171|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  172|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def131]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:171:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:171:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:171:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  169|       for (i = 1; i < x4; i++) {
#  170|           ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  171|->         ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  172|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  173|           memcpy(ciph_d[i].iv, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def132]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:173:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:173:9: note: write of 16 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:173:9: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  171|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  172|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  173|->         memcpy(ciph_d[i].iv, IVs, 16);
#  174|           IVs += 16;
#  175|       }

Error: CPPCHECK_WARNING (CWE-758): [#def133]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:609: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  607|                       c = p[j];
#  608|                       cmask =
#  609|->                         ((int)(j - off - SHA_DIGEST_LENGTH)) >> (sizeof(int) *
#  610|                                                                    8 - 1);
#  611|                       res |= (c ^ pad) & ~cmask; /* ... and padding */

Error: CPPCHECK_WARNING (CWE-758): [#def134]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c:612: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  610|                                                                    8 - 1);
#  611|                       res |= (c ^ pad) & ~cmask; /* ... and padding */
#  612|->                     cmask &= ((int)(off - 1 - j)) >> (sizeof(int) * 8 - 1);
#  613|                       res |= (c ^ pmac->c[i]) & cmask;
#  614|                       i += 1 & cmask;

Error: CPPCHECK_WARNING (CWE-457): [#def135]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:150: error[legacyUninitvar]: Uninitialized variable: blocks[0].c
#  148|   
#  149|       /* ask for IVs in bulk */
#  150|->     if (RAND_bytes_ex(ctx->base.libctx, (IVs = blocks[0].c), 16 * x4, 0) <= 0)
#  151|           return 0;
#  152|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def136]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c: scope_hint: In function 'tls1_multi_block_encrypt'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:174:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:174:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:174:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  172|   
#  173|       for (i = 1; i < x4; i++) {
#  174|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  175|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  176|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def137]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:174:39: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:174:39: note: write of 8 bytes to beyond the end of 'hash_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:174:39: note: valid subscripts for 'hash_d' are '[0]' to '[7]'
#  172|   
#  173|       for (i = 1; i < x4; i++) {
#  174|->         ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  175|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  176|           memcpy(ciph_d[i].out - 16, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def138]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:175:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:175:23: note: write of 8 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:175:23: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  173|       for (i = 1; i < x4; i++) {
#  174|           ciph_d[i].inp = hash_d[i].ptr = hash_d[i - 1].ptr + frag;
#  175|->         ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  176|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  177|           memcpy(ciph_d[i].iv, IVs, 16);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def139]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:177:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:177:9: note: write of 16 bytes to beyond the end of 'ciph_d'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:177:9: note: valid subscripts for 'ciph_d' are '[0]' to '[7]'
#  175|           ciph_d[i].out = ciph_d[i - 1].out + packlen;
#  176|           memcpy(ciph_d[i].out - 16, IVs, 16);
#  177|->         memcpy(ciph_d[i].iv, IVs, 16);
#  178|           IVs += 16;
#  179|       }

Error: CPPCHECK_WARNING (CWE-758): [#def140]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:663: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  661|                       c = p[j];
#  662|                       cmask =
#  663|->                         ((int)(j - off - SHA256_DIGEST_LENGTH)) >>
#  664|                           (sizeof(int) * 8 - 1);
#  665|                       res |= (c ^ pad) & ~cmask; /* ... and padding */

Error: CPPCHECK_WARNING (CWE-758): [#def141]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c:666: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  664|                           (sizeof(int) * 8 - 1);
#  665|                       res |= (c ^ pad) & ~cmask; /* ... and padding */
#  666|->                     cmask &= ((int)(off - 1 - j)) >> (sizeof(int) * 8 - 1);
#  667|                       res |= (c ^ pmac->c[i]) & cmask;
#  668|                       i += 1 & cmask;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def142]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2b_prov.c: scope_hint: In function 'blake2b_compress'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2b_prov.c:283:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'm[1]'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2b_prov.c:290:13: note: in expansion of macro 'G'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2b_prov.c:305:9: note: in expansion of macro 'ROUND'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2b_prov.c:290:13: note: in expansion of macro 'G'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2b_prov.c:305:9: note: in expansion of macro 'ROUND'
#  281|               c = c + d; \
#  282|               b = rotr64(b ^ c, 24); \
#  283|->             a = a + b + m[blake2b_sigma[r][2*i+1]]; \
#  284|               d = rotr64(d ^ a, 16); \
#  285|               c = c + d; \

Error: GCC_ANALYZER_WARNING (CWE-457): [#def143]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2s_prov.c: scope_hint: In function 'blake2s_compress'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2s_prov.c:204:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'm[1]'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2s_prov.c:211:13: note: in expansion of macro 'G'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2s_prov.c:226:9: note: in expansion of macro 'ROUND'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2s_prov.c:211:13: note: in expansion of macro 'G'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/digests/blake2s_prov.c:226:9: note: in expansion of macro 'ROUND'
#  202|               c = c + d; \
#  203|               b = rotr32(b ^ c, 12); \
#  204|->             a = a + b + m[blake2s_sigma[r][2*i+1]]; \
#  205|               d = rotr32(d ^ a, 8); \
#  206|               c = c + d; \

Error: GCC_ANALYZER_WARNING (CWE-457): [#def144]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/kdfs/argon2.c: scope_hint: In function 'blake2b_long'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/kdfs/argon2.c:884:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&outbuf'
#  882|   
#  883|       if (outlen > BLAKE2B_OUTBYTES) {
#  884|->         memcpy(out, outbuf, BLAKE2B_OUTBYTES / 2);
#  885|           out += BLAKE2B_OUTBYTES / 2;
#  886|           outlen_curr = (uint32_t) outlen - BLAKE2B_OUTBYTES / 2;

Error: COMPILER_WARNING (CWE-563): [#def145]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/kdfs/tls1_prf.c: scope_hint: In function 'kdf_tls1_prf_free'
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/kdfs/tls1_prf.c:131:19: warning[-Wunused-variable]: unused variable 'libctx'
#  131 |     OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
#      |                   ^~~~~~
#  129|   {
#  130|       TLS1_PRF *ctx = (TLS1_PRF *)vctx;
#  131|->     OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
#  132|   
#  133|       if (ctx != NULL) {

Error: CPPCHECK_WARNING (CWE-457): [#def146]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/signature/dsa_sig.c:363: warning[uninitvar]: Uninitialized variable: digest
#  361|       pdsactx->flag_allow_md = 1;
#  362|   
#  363|->     return dsa_sign(vpdsactx, sig, siglen, sigsize, digest, (size_t)dlen);
#  364|   }
#  365|   

Error: CPPCHECK_WARNING (CWE-457): [#def147]
openssl-3.2.2-build/openssl-3.2.2/providers/implementations/signature/rsa_sig.c:968: warning[uninitvar]: Uninitialized variable: digest
#  966|       }
#  967|   
#  968|->     return rsa_sign(vprsactx, sig, siglen, sigsize, digest, (size_t)dlen);
#  969|   }
#  970|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def148]
openssl-3.2.2-build/openssl-3.2.2/ssl/d1_lib.c: scope_hint: In function 'dtls1_shutdown'
openssl-3.2.2-build/openssl-3.2.2/ssl/d1_lib.c:869:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/d1_lib.c:14: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/d1_lib.c:862:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/d1_lib.c:862:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/d1_lib.c:862:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
#  867|       wbio = SSL_get_wbio(s);
#  868|       if (wbio != NULL && BIO_dgram_is_sctp(wbio) &&
#  869|->         !(sc->shutdown & SSL_SENT_SHUTDOWN)) {
#  870|           ret = BIO_dgram_sctp_wait_for_dry(wbio);
#  871|           if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def149]
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_shared.c: scope_hint: In function 'ossl_qrl_enc_level_set_have_el'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_shared.c:49:15: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#   47|       OSSL_QRL_ENC_LEVEL *el = ossl_qrl_enc_level_set_get(els, enc_level, 0);
#   48|   
#   49|->     switch (el->state) {
#   50|           case QRL_EL_STATE_UNPROV:
#   51|               return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def150]
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_shared.c: scope_hint: In function 'el_teardown_keyslot'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_shared.c:90:63: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#   88|       OSSL_QRL_ENC_LEVEL *el = ossl_qrl_enc_level_set_get(els, enc_level, 0);
#   89|   
#   90|->     if (!ossl_qrl_enc_level_set_has_keyslot(els, enc_level, el->state, keyslot))
#   91|           return;
#   92|   

Error: CPPCHECK_WARNING (CWE-476): [#def151]
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c:41: error[ctunullpointer]: Null pointer dereference: elem
#   39|   };
#   40|   
#   41|-> DEFINE_LIST_OF(txe, TXE);
#   42|   typedef OSSL_LIST(txe) TXE_LIST;
#   43|   

Error: CPPCHECK_WARNING (CWE-476): [#def152]
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_record_tx.c:41: error[ctunullpointer]: Null pointer dereference: list
#   39|   };
#   40|   
#   41|-> DEFINE_LIST_OF(txe, TXE);
#   42|   typedef OSSL_LIST(txe) TXE_LIST;
#   43|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def153]
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_tls.c: scope_hint: In function 'ossl_quic_tls_tick'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_tls.c:758:54: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_tls.c:12: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1824:7: note: in definition of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_tls.c:734:30: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_tls.c:9: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/quic/quic_tls.c:752:14: note: in expansion of macro 'SSL_set_min_proto_version'
#  756|           ossl_ssl_set_custom_record_layer(sc, &quic_tls_record_method, qtls);
#  757|   
#  758|->         if (!ossl_tls_add_custom_ext_intern(NULL, &sc->cert->custext,
#  759|                                               qtls->args.is_server ? ENDPOINT_SERVER
#  760|                                                                    : ENDPOINT_CLIENT,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def154]
openssl-3.2.2-build/openssl-3.2.2/ssl/record/methods/ktls_meth.c: scope_hint: In function 'ktls_configure_crypto'
openssl-3.2.2-build/openssl-3.2.2/ssl/record/methods/ktls_meth.c:225:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'eiv'
#  223|           crypto_info->gcm128.info.version = version;
#  224|           crypto_info->tls_crypto_info_len = sizeof(crypto_info->gcm128);
#  225|->         memcpy(crypto_info->gcm128.iv, eiv, TLS_CIPHER_AES_GCM_128_IV_SIZE);
#  226|           memcpy(crypto_info->gcm128.salt, iv, TLS_CIPHER_AES_GCM_128_SALT_SIZE);
#  227|           memcpy(crypto_info->gcm128.key, key, keylen);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def155]
openssl-3.2.2-build/openssl-3.2.2/ssl/record/methods/ktls_meth.c:242:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'eiv'
#  240|           crypto_info->gcm256.info.version = version;
#  241|           crypto_info->tls_crypto_info_len = sizeof(crypto_info->gcm256);
#  242|->         memcpy(crypto_info->gcm256.iv, eiv, TLS_CIPHER_AES_GCM_256_IV_SIZE);
#  243|           memcpy(crypto_info->gcm256.salt, iv, TLS_CIPHER_AES_GCM_256_SALT_SIZE);
#  244|           memcpy(crypto_info->gcm256.key, key, keylen);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def156]
openssl-3.2.2-build/openssl-3.2.2/ssl/record/methods/ktls_meth.c:260:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'eiv'
#  258|           crypto_info->ccm128.info.version = version;
#  259|           crypto_info->tls_crypto_info_len = sizeof(crypto_info->ccm128);
#  260|->         memcpy(crypto_info->ccm128.iv, eiv, TLS_CIPHER_AES_CCM_128_IV_SIZE);
#  261|           memcpy(crypto_info->ccm128.salt, iv, TLS_CIPHER_AES_CCM_128_SALT_SIZE);
#  262|           memcpy(crypto_info->ccm128.key, key, keylen);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def157]
openssl-3.2.2-build/openssl-3.2.2/ssl/record/rec_layer_s3.c: scope_hint: In function 'ssl3_read_bytes'
openssl-3.2.2-build/openssl-3.2.2/ssl/record/rec_layer_s3.c:666:14: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
#  664|       if (!ossl_statem_get_in_handshake(s) && SSL_in_init(ssl)) {
#  665|           /* type == SSL3_RT_APPLICATION_DATA */
#  666|->         i = s->handshake_func(ssl);
#  667|           /* SSLfatal() already called */
#  668|           if (i < 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def158]
openssl-3.2.2-build/openssl-3.2.2/ssl/record/rec_layer_s3.c:674:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
#  672|       }
#  673|    start:
#  674|->     s->rwstate = SSL_NOTHING;
#  675|   
#  676|       /*-

Error: CPPCHECK_WARNING (CWE-476): [#def159]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_cert_comp.c:416: warning[nullPointer]: Possible null pointer dereference: sc
#  414|       CERT_PKEY *cpk = NULL;
#  415|   
#  416|->     if (sc->cert != NULL)
#  417|           cpk = sc->cert->key;
#  418|       else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def160]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_cert_comp.c: scope_hint: In function 'SSL_get1_compressed_cert'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_cert_comp.c:416:11: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_cert_comp.c:11: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_cert_comp.c:413:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#  414|       CERT_PKEY *cpk = NULL;
#  415|   
#  416|->     if (sc->cert != NULL)
#  417|           cpk = sc->cert->key;
#  418|       else

Error: COMPILER_WARNING (CWE-704): [#def161]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_ciph.c: scope_hint: In function 'ssl_create_cipher_list'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_ciph.c:1526:19: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 1526 |         char *p = rule_str + 14;
#      |                   ^~~~~~~~
# 1524|   
# 1525|       if (rule_str != NULL && strncmp(rule_str, "PROFILE=SYSTEM", 14) == 0) {
# 1526|->         char *p = rule_str + 14;
# 1527|   
# 1528|           new_rules = load_system_str(p);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def162]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_is_dtls'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:935:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:13: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:932:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#  933|   
#  934|   #ifndef OPENSSL_NO_QUIC
#  935|->     if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
#  936|           return 0;
#  937|   #endif

Error: GCC_ANALYZER_WARNING (CWE-476): [#def163]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_is_tls'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:950:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:947:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#  948|   
#  949|   #ifndef OPENSSL_NO_QUIC
#  950|->     if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
#  951|           return 0;
#  952|   #endif

Error: GCC_ANALYZER_WARNING (CWE-476): [#def164]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_set_wfd'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:1693:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1833:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:1581:32: note: in expansion of macro 'SSL_CONNECTION_FROM_CONST_SSL'
# 1691|       int desired_type = IS_QUIC(s) ? BIO_TYPE_DGRAM : BIO_TYPE_SOCKET;
# 1692|   
# 1693|->     if (s->type == SSL_TYPE_QUIC_XSO) {
# 1694|           ERR_raise(ERR_LIB_SSL, SSL_R_CONN_USE_ONLY);
# 1695|           return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def165]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_set_rfd'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:1729:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1833:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:1596:32: note: in expansion of macro 'SSL_CONNECTION_FROM_CONST_SSL'
# 1727|       int desired_type = IS_QUIC(s) ? BIO_TYPE_DGRAM : BIO_TYPE_SOCKET;
# 1728|   
# 1729|->     if (s->type == SSL_TYPE_QUIC_XSO) {
# 1730|           ERR_raise(ERR_LIB_SSL, SSL_R_CONN_USE_ONLY);
# 1731|           return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def166]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_do_handshake'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4718:11: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4711:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
# 4716|   #endif
# 4717|   
# 4718|->     if (sc->handshake_func == NULL) {
# 4719|           ERR_raise(ERR_LIB_SSL, SSL_R_CONNECTION_TYPE_NOT_SET);
# 4720|           return -1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def167]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_set_accept_state'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4753:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4744:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
# 4751|   #endif
# 4752|   
# 4753|->     sc->server = 1;
# 4754|       sc->shutdown = 0;
# 4755|       ossl_statem_clear(sc);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def168]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_set_connect_state'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4772:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4763:26: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
# 4770|   #endif
# 4771|   
# 4772|->     sc->server = 0;
# 4773|       sc->shutdown = 0;
# 4774|       ossl_statem_clear(sc);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def169]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_get_version'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4842:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1833:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:4838:32: note: in expansion of macro 'SSL_CONNECTION_FROM_CONST_SSL'
# 4840|   #ifndef OPENSSL_NO_QUIC
# 4841|       /* We only support QUICv1 - so if its QUIC its QUICv1 */
# 4842|->     if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
# 4843|           return "QUICv1";
# 4844|   #endif

Error: GCC_ANALYZER_WARNING (CWE-476): [#def170]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_version'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:5204:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1833:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:5200:32: note: in expansion of macro 'SSL_CONNECTION_FROM_CONST_SSL'
# 5202|   #ifndef OPENSSL_NO_QUIC
# 5203|       /* We only support QUICv1 - so if its QUIC its QUICv1 */
# 5204|->     if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
# 5205|           return OSSL_QUIC1_VERSION;
# 5206|   #endif

Error: GCC_ANALYZER_WARNING (CWE-476): [#def171]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_client_version'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:5219:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1833:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:5215:32: note: in expansion of macro 'SSL_CONNECTION_FROM_CONST_SSL'
# 5217|   #ifndef OPENSSL_NO_QUIC
# 5218|       /* We only support QUICv1 - so if its QUIC its QUICv1 */
# 5219|->     if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
# 5220|           return OSSL_QUIC1_VERSION;
# 5221|   #endif

Error: GCC_ANALYZER_WARNING (CWE-476): [#def172]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_get0_client_cert_type'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:7784:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1833:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:7779:32: note: in expansion of macro 'SSL_CONNECTION_FROM_CONST_SSL'
# 7782|           return 0;
# 7783|   
# 7784|->     *t = sc->client_cert_type;
# 7785|       *len = sc->client_cert_type_len;
# 7786|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def173]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c: scope_hint: In function 'SSL_get0_server_cert_type'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:7796:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1833:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_lib.c:7791:32: note: in expansion of macro 'SSL_CONNECTION_FROM_CONST_SSL'
# 7794|           return 0;
# 7795|   
# 7796|->     *t = sc->server_cert_type;
# 7797|       *len = sc->server_cert_type_len;
# 7798|       return 1;

Error: CPPCHECK_WARNING (CWE-476): [#def174]
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_rsa.c:961: warning[nullPointer]: Possible null pointer dereference: ctx
#  959|           return 0;
#  960|   
#  961|->     c = sc != NULL ? sc->cert : ctx->cert;
#  962|       /* Do all security checks before anything else */
#  963|       rv = ssl_security_cert(sc, ctx, x509, 0, 1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def175]
openssl-3.2.2-build/openssl-3.2.2/ssl/statem/statem_dtls.c: scope_hint: In function 'dtls1_buffer_message'
openssl-3.2.2-build/openssl-3.2.2/ssl/statem/statem_dtls.c:1127:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
# 1125|           return 0;
# 1126|   
# 1127|->     memcpy(frag->fragment, s->init_buf->data, s->init_num);
# 1128|   
# 1129|       if (is_ccs) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def176]
openssl-3.2.2-build/openssl-3.2.2/ssl/t1_lib.c: scope_hint: In function 'tls_choose_sigalg'
openssl-3.2.2-build/openssl-3.2.2/ssl/t1_lib.c:3907:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'lu'
# 3905|       }
# 3906|       if (sig_idx == -1)
# 3907|->         sig_idx = lu->sig_idx;
# 3908|       s->s3.tmp.cert = &s->cert->pkeys[sig_idx];
# 3909|       s->cert->key = s->s3.tmp.cert;

Error: COMPILER_WARNING (CWE-1164): [#def177]
openssl-3.2.2-build/openssl-3.2.2/test/acvp_test.c:369:12: warning[-Wunused-function]: 'dsa_keygen_test' defined but not used
#  369 | static int dsa_keygen_test(int id)
#      |            ^~~~~~~~~~~~~~~
#  367|   }
#  368|   
#  369|-> static int dsa_keygen_test(int id)
#  370|   {
#  371|       int ret = 0, i;

Error: COMPILER_WARNING (CWE-1164): [#def178]
openssl-3.2.2-build/openssl-3.2.2/test/acvp_test.c:409:12: warning[-Wunused-function]: 'dsa_paramgen_test' defined but not used
#  409 | static int dsa_paramgen_test(int id)
#      |            ^~~~~~~~~~~~~~~~~
#  407|   }
#  408|   
#  409|-> static int dsa_paramgen_test(int id)
#  410|   {
#  411|       int ret = 0, counter = 0;

Error: COMPILER_WARNING (CWE-1164): [#def179]
openssl-3.2.2-build/openssl-3.2.2/test/acvp_test.c:520:12: warning[-Wunused-function]: 'dsa_pqver_test' defined but not used
#  520 | static int dsa_pqver_test(int id)
#      |            ^~~~~~~~~~~~~~
#  518|   }
#  519|   
#  520|-> static int dsa_pqver_test(int id)
#  521|   {
#  522|       int ret = 0;

Error: COMPILER_WARNING (CWE-1164): [#def180]
openssl-3.2.2-build/openssl-3.2.2/test/acvp_test.c:589:12: warning[-Wunused-function]: 'dsa_siggen_test' defined but not used
#  589 | static int dsa_siggen_test(int id)
#      |            ^~~~~~~~~~~~~~~
#  587|   }
#  588|   
#  589|-> static int dsa_siggen_test(int id)
#  590|   {
#  591|       int ret = 0;

Error: COMPILER_WARNING (CWE-1164): [#def181]
openssl-3.2.2-build/openssl-3.2.2/test/acvp_test.c:615:12: warning[-Wunused-function]: 'dsa_sigver_test' defined but not used
#  615 | static int dsa_sigver_test(int id)
#      |            ^~~~~~~~~~~~~~~
#  613|   }
#  614|   
#  615|-> static int dsa_sigver_test(int id)
#  616|   {
#  617|       int ret = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def182]
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:215: warning[nullPointer]: Possible null pointer dereference: sc
#  213|   
#  214|           /* expect that the pre-compressed cert won't be used */
#  215|->         if (!TEST_int_eq(sc->cert->key->cert_comp_used, 0))
#  216|               goto end;
#  217|   

Error: CPPCHECK_WARNING (CWE-476): [#def183]
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:223: warning[nullPointer]: Possible null pointer dereference: sc
#  221|           SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(serverssl);
#  222|   
#  223|->         if (!TEST_int_gt(sc->cert->key->cert_comp_used, 0))
#  224|               goto end;
#  225|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def184]
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:21: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c: scope_hint: In function 'test_ssl_cert_comp'
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:223:28: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:436:71: note: in definition of macro 'TEST_int_gt'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:196:20: note: in expansion of macro 'SSL_set_app_data'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:198:20: note: in expansion of macro 'SSL_set_app_data'
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:22: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:221:30: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/test/cert_comp_test.c:221:30: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:436:71: note: in definition of macro 'TEST_int_gt'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:436:71: note: in definition of macro 'TEST_int_gt'
#  221|           SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(serverssl);
#  222|   
#  223|->         if (!TEST_int_gt(sc->cert->key->cert_comp_used, 0))
#  224|               goto end;
#  225|   

Error: COMPILER_WARNING (CWE-1164): [#def185]
openssl-3.2.2-build/openssl-3.2.2/test/cipherlist_test.c:197:12: warning[-Wunused-function]: 'test_default_cipherlist_implicit' defined but not used
#  197 | static int test_default_cipherlist_implicit(void)
#      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  195|       EXECUTE_TEST(execute_test, tear_down)
#  196|   
#  197|-> static int test_default_cipherlist_implicit(void)
#  198|   {
#  199|       SETUP_CIPHERLIST_TEST_FIXTURE();

Error: CPPCHECK_WARNING (CWE-476): [#def186]
openssl-3.2.2-build/openssl-3.2.2/test/cmp_vfy_test.c:340: warning[nullPointer]: Possible null pointer dereference: fixture
#  338|           fixture = NULL;
#  339|       }
#  340|->     fixture->cert = sk_X509_value(fixture->msg->extraCerts, 1); /* Insta CA */
#  341|       EXECUTE_TEST(execute_validate_msg_test, tear_down);
#  342|       return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def187]
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509v3.h:25: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/openssl/crmf.h:28: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/openssl/cmp.h:23: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/helpers/cmp_testlib.h:15: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/cmp_vfy_test.c:12: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/cmp_vfy_test.c: scope_hint: In function 'test_validate_msg_signature_sender_cert_extracert'
openssl-3.2.2-build/openssl-3.2.2/test/cmp_vfy_test.c:340:42: warning[-Wanalyzer-null-dereference]: dereference of NULL 'fixture'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509.h:80:88: note: in definition of macro 'sk_X509_value'
openssl-3.2.2-build/openssl-3.2.2/test/helpers/cmp_testlib.h:20: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:100:34: note: in definition of macro 'SETUP_TEST_FIXTURE'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/cmp_vfy_test.c:64:17: note: in expansion of macro 'OSSL_CMP_CTX_set0_trusted'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:100:34: note: in definition of macro 'SETUP_TEST_FIXTURE'
openssl-3.2.2-build/openssl-3.2.2/test/cmp_vfy_test.c:333:5: note: in expansion of macro 'SETUP_TEST_FIXTURE'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/x509.h:80:88: note: in definition of macro 'sk_X509_value'
#  338|           fixture = NULL;
#  339|       }
#  340|->     fixture->cert = sk_X509_value(fixture->msg->extraCerts, 1); /* Insta CA */
#  341|       EXECUTE_TEST(execute_validate_msg_test, tear_down);
#  342|       return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def188]
openssl-3.2.2-build/openssl-3.2.2/test/drbgtest.c:107:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'drbg'
openssl-3.2.2-build/openssl-3.2.2/test/drbgtest.c: scope_hint: In function 'inc_reseed_counter'
openssl-3.2.2-build/openssl-3.2.2/test/drbgtest.c:43: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/drbgtest.c:819:13: note: in expansion of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
#  105|   static PROV_DRBG *prov_rand(EVP_RAND_CTX *drbg)
#  106|   {
#  107|->     return (PROV_DRBG *)drbg->algctx;
#  108|   }
#  109|   

Error: COMPILER_WARNING (CWE-563): [#def189]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:170:19: warning[-Wunused-but-set-variable]: variable 'buf' set but not used
#  170 |     unsigned char buf[100];
#      |                   ^~~
#  168|       const BIGNUM *scalars[4];
#  169|   #endif
#  170|->     unsigned char buf[100];
#  171|       size_t len, r = 0;
#  172|       int k;

Error: COMPILER_WARNING (CWE-563): [#def190]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:171:12: warning[-Wunused-variable]: unused variable 'len'
#  171 |     size_t len, r = 0;
#      |            ^~~
#  169|   #endif
#  170|       unsigned char buf[100];
#  171|->     size_t len, r = 0;
#  172|       int k;
#  173|   

Error: COMPILER_WARNING (CWE-563): [#def191]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c: scope_hint: In function 'prime_field_tests'
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:172:9: warning[-Wunused-variable]: unused variable 'k'
#  172 |     int k;
#      |         ^
#  170|       unsigned char buf[100];
#  171|       size_t len, r = 0;
#  172|->     int k;
#  173|   
#  174|       if (!TEST_ptr(ctx = BN_CTX_new())

Error: COMPILER_WARNING (CWE-1164): [#def192]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c: scope_hint: At top level
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2079:12: warning[-Wunused-function]: 'cofactor_range_test' defined but not used
# 2079 | static int cofactor_range_test(void)
#      |            ^~~~~~~~~~~~~~~~~~~
# 2077|    * conform to that -- this is just robustness testing.
# 2078|    */
# 2079|-> static int cofactor_range_test(void)
# 2080|   {
# 2081|       EC_GROUP *group = NULL;

Error: COMPILER_WARNING (CWE-563): [#def193]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2345:18: warning[-Wunused-variable]: unused variable 'i_out'
# 2345 |     int ret = 0, i_out;
#      |                  ^~~~~
# 2343|                                               unsigned char *gen, int gen_size)
# 2344|   {
# 2345|->     int ret = 0, i_out;
# 2346|       EVP_PKEY_CTX *pctx = NULL;
# 2347|       EVP_PKEY *pkeyparam = NULL;

Error: COMPILER_WARNING (CWE-563): [#def194]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2351:23: warning[-Wunused-variable]: unused variable 'gettable'
# 2351 |     const OSSL_PARAM *gettable;
#      |                       ^~~~~~~~
# 2349|       const char *field_name;
# 2350|       OSSL_PARAM *params = NULL;
# 2351|->     const OSSL_PARAM *gettable;
# 2352|       BIGNUM *p, *a, *b;
# 2353|       BIGNUM *p_out = NULL, *a_out = NULL, *b_out = NULL;

Error: COMPILER_WARNING (CWE-563): [#def195]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2355:10: warning[-Wunused-variable]: unused variable 'name'
# 2355 |     char name[80];
#      |          ^~~~
# 2353|       BIGNUM *p_out = NULL, *a_out = NULL, *b_out = NULL;
# 2354|       BIGNUM *order_out = NULL, *cofactor_out = NULL;
# 2355|->     char name[80];
# 2356|       unsigned char buf[1024];
# 2357|       size_t buf_len, name_len;

Error: COMPILER_WARNING (CWE-563): [#def196]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2356:19: warning[-Wunused-variable]: unused variable 'buf'
# 2356 |     unsigned char buf[1024];
#      |                   ^~~
# 2354|       BIGNUM *order_out = NULL, *cofactor_out = NULL;
# 2355|       char name[80];
# 2356|->     unsigned char buf[1024];
# 2357|       size_t buf_len, name_len;
# 2358|   #ifndef OPENSSL_NO_EC2M

Error: COMPILER_WARNING (CWE-563): [#def197]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2357:12: warning[-Wunused-variable]: unused variable 'buf_len'
# 2357 |     size_t buf_len, name_len;
#      |            ^~~~~~~
# 2355|       char name[80];
# 2356|       unsigned char buf[1024];
# 2357|->     size_t buf_len, name_len;
# 2358|   #ifndef OPENSSL_NO_EC2M
# 2359|       unsigned int k1 = 0, k2 = 0, k3 = 0;

Error: COMPILER_WARNING (CWE-563): [#def198]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c: scope_hint: In function 'do_test_custom_explicit_fromdata'
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2357:21: warning[-Wunused-variable]: unused variable 'name_len'
# 2357 |     size_t buf_len, name_len;
#      |                     ^~~~~~~~
# 2355|       char name[80];
# 2356|       unsigned char buf[1024];
# 2357|->     size_t buf_len, name_len;
# 2358|   #ifndef OPENSSL_NO_EC2M
# 2359|       unsigned int k1 = 0, k2 = 0, k3 = 0;

Error: COMPILER_WARNING (CWE-563): [#def199]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2667:12: warning[-Wunused-variable]: unused variable 'sslen'
# 2667 |     size_t sslen, t;
#      |            ^~~~~
# 2665|       EVP_PKEY *pkey1 = NULL, *pkey2 = NULL;
# 2666|       EVP_PKEY_CTX *pctx1 = NULL, *pctx2 = NULL;
# 2667|->     size_t sslen, t;
# 2668|       unsigned char *pub1 = NULL , *pub2 = NULL;
# 2669|       OSSL_PARAM_BLD *param_bld = NULL;

Error: COMPILER_WARNING (CWE-563): [#def200]
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c: scope_hint: In function 'custom_params_test'
openssl-3.2.2-build/openssl-3.2.2/test/ectest.c:2667:19: warning[-Wunused-variable]: unused variable 't'
# 2667 |     size_t sslen, t;
#      |                   ^
# 2665|       EVP_PKEY *pkey1 = NULL, *pkey2 = NULL;
# 2666|       EVP_PKEY_CTX *pctx1 = NULL, *pctx2 = NULL;
# 2667|->     size_t sslen, t;
# 2668|       unsigned char *pub1 = NULL , *pub2 = NULL;
# 2669|       OSSL_PARAM_BLD *param_bld = NULL;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def201]
openssl-3.2.2-build/openssl-3.2.2/test/endecode_test.c: scope_hint: In function 'check_protected_legacy_PEM'
openssl-3.2.2-build/openssl-3.2.2/test/endecode_test.c:776:24: warning[-Wanalyzer-null-argument]: use of NULL 'data' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/test/endecode_test.c:34:63: note: in definition of macro 'TEST_FL_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/endecode_test.c:27: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/endecode_test.c:775:12: note: in expansion of macro 'TEST_FL_strn_eq'
openssl-3.2.2-build/openssl-3.2.2/test/endecode_test.c:34:63: note: in definition of macro 'TEST_FL_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/endecode_test.c:34:63: note: in definition of macro 'TEST_FL_ptr'
<built-in>: note: argument 1 of '__builtin_strstr' must be non-null
#  774|                                    "-----BEGIN %s PRIVATE KEY-----", type), 0)
#  775|           && TEST_FL_strn_eq(data, expected_pem_header, strlen(expected_pem_header))
#  776|->         && TEST_FL_ptr(strstr(data, "\nDEK-Info: "));
#  777|   }
#  778|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def202]
openssl-3.2.2-build/openssl-3.2.2/test/endecoder_legacy_test.c:59: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/endecoder_legacy_test.c: scope_hint: In function 'test_key'
openssl-3.2.2-build/openssl-3.2.2/test/endecoder_legacy_test.c:519:24: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
#  517|   
#  518|       /* Set up the keys */
#  519|->     if (!TEST_ptr(pkey = key->key)
#  520|           || !TEST_true(evp_pkey_copy_downgraded(&downgraded_pkey, pkey))
#  521|           || !TEST_ptr(downgraded_pkey)

Error: CPPCHECK_WARNING (CWE-416): [#def203]
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:465: error[deallocuse]: Dereferencing 'fp' after it is deallocated / released
#  463|           || !TEST_ptr(key = EVP_PKEY_Q_keygen(mainctx, NULL, "EC", "P-256"))
#  464|           || !TEST_true(i2d_PUBKEY_fp(fp, key))
#  465|->         || !TEST_int_eq(fclose(fp), 0))
#  466|           goto err;
#  467|       fp = NULL;

Error: GCC_ANALYZER_WARNING (CWE-910): [#def204]
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:479:5: warning[-Wanalyzer-double-fclose]: double 'fclose' of FILE 'fp'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:465:13: note: in expansion of macro 'TEST_int_eq'
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:465:13: note: in expansion of macro 'TEST_int_eq'
#  477|       EVP_PKEY_free(outkey);
#  478|       EVP_PKEY_free(key);
#  479|->     fclose(fp);
#  480|       return ret;
#  481|   }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def205]
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:479:5: warning[-Wanalyzer-double-free]: double-'fclose' of 'fp'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:465:13: note: in expansion of macro 'TEST_int_eq'
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:465:13: note: in expansion of macro 'TEST_int_eq'
#  477|       EVP_PKEY_free(outkey);
#  478|       EVP_PKEY_free(key);
#  479|->     fclose(fp);
#  480|       return ret;
#  481|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def206]
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c: scope_hint: In function 'test_ec_d2i_i2d_pubkey'
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:479:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'fp' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:28: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/evp.h:22: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/evp_extra_test2.c:20: included_from: Included from here.
/usr/include/stdio.h:184:12: note: argument 1 of 'fclose' must be non-null
#  477|       EVP_PKEY_free(outkey);
#  478|       EVP_PKEY_free(key);
#  479|->     fclose(fp);
#  480|       return ret;
#  481|   }

Error: GCC_ANALYZER_WARNING (CWE-121): [#def207]
openssl-3.2.2-build/openssl-3.2.2/test/evp_fetch_prov_test.c: scope_hint: In function 'load_providers'
openssl-3.2.2-build/openssl-3.2.2/test/evp_fetch_prov_test.c:96:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
openssl-3.2.2-build/openssl-3.2.2/test/evp_fetch_prov_test.c:22: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/evp_fetch_prov_test.c:96:17: note: write of 8 bytes to beyond the end of 'prov'
openssl-3.2.2-build/openssl-3.2.2/test/evp_fetch_prov_test.c:96:17: note: valid subscripts for 'prov' are '[0]' to '[1]'
#   94|       for (i = 0; i < test_get_argument_count(); ++i) {
#   95|           char *provname = test_get_argument(i);
#   96|->         prov[i] = OSSL_PROVIDER_load(ctx, provname);
#   97|           if (!TEST_ptr(prov[i]))
#   98|               goto err;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def208]
openssl-3.2.2-build/openssl-3.2.2/test/evp_test.c: scope_hint: In function 'keypair_test_init'
openssl-3.2.2-build/openssl-3.2.2/test/evp_test.c:3144:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'pub'
openssl-3.2.2-build/openssl-3.2.2/test/evp_test.c:29: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
# 3142|           goto end;
# 3143|       }
# 3144|->     *pub++ = '\0';
# 3145|   
# 3146|       if (!TEST_true(find_key(&pk, priv, private_keys))) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def209]
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c:89:26: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c: scope_hint: In function 'fake_rsa_st_load'
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c:16: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c:631:14: note: in expansion of macro 'TEST_int_gt'
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c:631:14: note: in expansion of macro 'TEST_int_gt'
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c:631:14: note: in expansion of macro 'TEST_int_gt'
#   87|   
#   88|       /* key was imported */
#   89|->     fake_rsa_key->status = 1;
#   90|   
#   91|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def210]
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c: scope_hint: In function 'fake_rsa_gen'
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c:261:21: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
openssl-3.2.2-build/openssl-3.2.2/test/fake_rsaprov.c:255:13: note: in expansion of macro 'TEST_mem_eq'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
#  259|           return NULL;
#  260|   
#  261|->     keydata->status = 2;
#  262|       return keydata;
#  263|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def211]
openssl-3.2.2-build/openssl-3.2.2/test/helpers/noisydgrambio.c: scope_hint: In function 'noisy_dgram_recvmmsg'
openssl-3.2.2-build/openssl-3.2.2/test/helpers/noisydgrambio.c:266:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'flip_offset'
#  264|           }
#  265|   
#  266|->         flip_bits(thismsg->data, thismsg->data_len, flip, flip_offset);
#  267|   
#  268|           /*

Error: GCC_ANALYZER_WARNING (CWE-476): [#def212]
openssl-3.2.2-build/openssl-3.2.2/test/helpers/quictestlib.c: scope_hint: In function 'qtest_create_quic_objects'
openssl-3.2.2-build/openssl-3.2.2/test/helpers/quictestlib.c:250:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 'fault'
openssl-3.2.2-build/openssl-3.2.2/test/helpers/quictestlib.c:16: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/helpers/quictestlib.c:227:14: note: in expansion of macro 'TEST_ptr'
#  248|           (void)BIO_ctrl(sbio, BIO_CTRL_NOISE_BACK_OFF, 0, NULL);
#  249|   
#  250|->         (*fault)->noiseargs.cbio = cbio;
#  251|           (*fault)->noiseargs.sbio = sbio;
#  252|           (*fault)->noiseargs.tracebio = tmpbio;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def213]
openssl-3.2.2-build/openssl-3.2.2/test/params_test.c: scope_hint: In function 'cleanup_object'
openssl-3.2.2-build/openssl-3.2.2/test/params_test.c:92:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'vobj'
openssl-3.2.2-build/openssl-3.2.2/test/params_test.c:22: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
#   90|       struct object_st *obj = vobj;
#   91|   
#   92|->     BN_free(obj->p3);
#   93|       obj->p3 = NULL;
#   94|       OPENSSL_free(obj->p4);

Error: GCC_ANALYZER_WARNING (CWE-124): [#def214]
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1181:16: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:17: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/include/internal/quic_stream.h:15: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/quic_tserver.h:15: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:14: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/internal/safe_math.h:432:5: note: in expansion of macro 'OSSL_SAFE_MATH_ADDU'
openssl-3.2.2-build/openssl-3.2.2/include/internal/time.h:53:1: note: in expansion of macro 'OSSL_SAFE_MATH_UNSIGNED'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1181:16: note: valid subscripts for 'repeat_stack_done' are '[0]' to '[7]'
# 1179|                   goto out;
# 1180|   
# 1181|->             if (++repeat_stack_done[repeat_stack_len - 1]
# 1182|                   == repeat_stack_limit[repeat_stack_len - 1]) {
# 1183|                   --repeat_stack_len;

Error: GCC_ANALYZER_WARNING (CWE-127): [#def215]
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1181:36: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/include/internal/safe_math.h:432:5: note: in expansion of macro 'OSSL_SAFE_MATH_ADDU'
openssl-3.2.2-build/openssl-3.2.2/include/internal/time.h:53:1: note: in expansion of macro 'OSSL_SAFE_MATH_UNSIGNED'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1181:36: note: valid subscripts for 'repeat_stack_done' are '[0]' to '[7]'
# 1179|                   goto out;
# 1180|   
# 1181|->             if (++repeat_stack_done[repeat_stack_len - 1]
# 1182|                   == repeat_stack_limit[repeat_stack_len - 1]) {
# 1183|                   --repeat_stack_len;

Error: GCC_ANALYZER_WARNING (CWE-127): [#def216]
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1182:38: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/include/internal/safe_math.h:432:5: note: in expansion of macro 'OSSL_SAFE_MATH_ADDU'
openssl-3.2.2-build/openssl-3.2.2/include/internal/time.h:53:1: note: in expansion of macro 'OSSL_SAFE_MATH_UNSIGNED'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1182:38: note: valid subscripts for 'repeat_stack_limit' are '[0]' to '[7]'
# 1180|   
# 1181|               if (++repeat_stack_done[repeat_stack_len - 1]
# 1182|->                 == repeat_stack_limit[repeat_stack_len - 1]) {
# 1183|                   --repeat_stack_len;
# 1184|               } else {

Error: GCC_ANALYZER_WARNING (CWE-127): [#def217]
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1185:24: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/include/internal/safe_math.h:432:5: note: in expansion of macro 'OSSL_SAFE_MATH_ADDU'
openssl-3.2.2-build/openssl-3.2.2/include/internal/time.h:53:1: note: in expansion of macro 'OSSL_SAFE_MATH_UNSIGNED'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c: scope_hint: In function 'run_script_worker'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1061:14: note: in expansion of macro 'TEST_int_le'
openssl-3.2.2-build/openssl-3.2.2/test/quic_multistream_test.c:1185:24: note: valid subscripts for 'repeat_stack_idx' are '[0]' to '[7]'
# 1183|                   --repeat_stack_len;
# 1184|               } else {
# 1185|->                 op_idx = repeat_stack_idx[repeat_stack_len - 1];
# 1186|                   no_advance = 1;
# 1187|                   continue;

Error: CPPCHECK_WARNING (CWE-758): [#def218]
openssl-3.2.2-build/openssl-3.2.2/test/safe_math_test.c:24: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   22|   
#   23|   /* Create the safe math instances we're interested in */
#   24|-> OSSL_SAFE_MATH_SIGNED(int, int)
#   25|   OSSL_SAFE_MATH_UNSIGNED(uint, unsigned int)
#   26|   OSSL_SAFE_MATH_UNSIGNED(size_t, size_t)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def219]
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c: scope_hint: In function 'test_handshake_rtt'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:80:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:28: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:31: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:73:9: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#   78|       switch (tst) {
#   79|       case 0:
#   80|->         st->hand_state = TLS_ST_CW_CLNT_HELLO;
#   81|           ossl_statem_client_write_transition(s);
#   82|           OSSL_sleep(1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def220]
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:87:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:73:9: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#   85|           break;
#   86|       case 1:
#   87|->         st->hand_state = TLS_ST_SW_SRVR_DONE;
#   88|           ossl_statem_server_write_transition(s);
#   89|           OSSL_sleep(1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def221]
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:94:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:73:9: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#   92|           break;
#   93|       case 2:
#   94|->         st->hand_state = TLS_ST_CW_CLNT_HELLO;
#   95|           ossl_statem_client_write_transition(s);
#   96|           OSSL_sleep(1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def222]
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:101:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:73:9: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#   99|           break;
#  100|       case 3:
#  101|->         st->hand_state = TLS_ST_SW_SRVR_DONE;
#  102|           ossl_statem_server_write_transition(s);
#  103|           OSSL_sleep(1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def223]
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:108:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1831:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_int'
openssl-3.2.2-build/openssl-3.2.2/test/ssl_handshake_rtt_test.c:73:9: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL'
#  106|           break;
#  107|       case 4:
#  108|->         st->hand_state = TLS_ST_EARLY_DATA;
#  109|           ossl_statem_client_write_transition(s);
#  110|           OSSL_sleep(1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def224]
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:268:29: warning[-Wanalyzer-null-argument]: use of NULL 'token' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:525:67: note: in definition of macro 'TEST_false'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:254:18: note: in expansion of macro 'TEST_size_t_eq'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:525:67: note: in definition of macro 'TEST_false'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:525:67: note: in definition of macro 'TEST_false'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:525:67: note: in definition of macro 'TEST_false'
<built-in>: note: argument 1 of '__builtin_strlen' must be non-null
#  266|               if (!TEST_size_t_ne(master_key_size, 0))
#  267|                   return 0;
#  268|->             if (!TEST_false(compare_hex_encoded_buffer(token, strlen(token),
#  269|                                                          actual_master_key,
#  270|                                                          master_key_size)))

Error: COMPILER_WARNING (CWE-563): [#def225]
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c: scope_hint: In function 'test_client_cert_verify_cb'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:576:25: warning[-Wunused-variable]: unused variable 'status'
#  576 |     int testresult = 0, status;
#      |                         ^~~~~~
#  574|       SSL_CTX *cctx = NULL, *sctx = NULL;
#  575|       SSL *clientssl = NULL, *serverssl = NULL;
#  576|->     int testresult = 0, status;
#  577|   
#  578|       if (!TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def226]
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c: scope_hint: In function 'execute_cleanse_plaintext'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1778:15: warning[-Wanalyzer-null-dereference]: dereference of NULL 'serversc'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1763:10: note: in expansion of macro 'TEST_int_eq'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1766:10: note: in expansion of macro 'TEST_mem_eq'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/ssl/ssl_local.h:1816:5: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY_int'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:1774:30: note: in expansion of macro 'SSL_CONNECTION_FROM_SSL_ONLY'
# 1776|       rr = serversc->rlayer.tlsrecs;
# 1777|   
# 1778|->     zbuf = &rr->data[rr->off];
# 1779|       if (!TEST_int_eq(rr->length, sizeof(cbuf)))
# 1780|           goto end;

Error: CPPCHECK_WARNING (CWE-476): [#def227]
openssl-3.2.2-build/openssl-3.2.2/test/sslbuffertest.c:49: warning[nullPointer]: Possible null pointer dereference: sc
#   47|   {
#   48|       SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
#   49|->     OSSL_RECORD_LAYER *rrl = sc->rlayer.rrl;
#   50|       OSSL_RECORD_LAYER *wrl = sc->rlayer.wrl;
#   51|   

Error: CPPCHECK_WARNING (CWE-476): [#def228]
openssl-3.2.2-build/openssl-3.2.2/test/sslbuffertest.c:50: warning[nullPointer]: Possible null pointer dereference: sc
#   48|       SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
#   49|       OSSL_RECORD_LAYER *rrl = sc->rlayer.rrl;
#   50|->     OSSL_RECORD_LAYER *wrl = sc->rlayer.wrl;
#   51|   
#   52|       if (isalloced)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def229]
openssl-3.2.2-build/openssl-3.2.2/test/params_test.c: scope_hint: In function 'test_case_variant'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:432:31: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
openssl-3.2.2-build/openssl-3.2.2/test/params_test.c:489:14: note: in expansion of macro 'TEST_int_eq'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:524:66: note: in definition of macro 'TEST_true'
openssl-3.2.2-build/openssl-3.2.2/test/params_test.c:489:14: note: in expansion of macro 'TEST_int_eq'
openssl-3.2.2-build/openssl-3.2.2/test/params_test.c:489:14: note: in expansion of macro 'TEST_int_eq'
#  430|    *      if (!TEST_ptr(ptr))
#  431|    */
#  432|-> # define TEST_int_eq(a, b)    test_int_eq(__FILE__, __LINE__, #a, #b, a, b)
#  433|   # define TEST_int_ne(a, b)    test_int_ne(__FILE__, __LINE__, #a, #b, a, b)
#  434|   # define TEST_int_lt(a, b)    test_int_lt(__FILE__, __LINE__, #a, #b, a, b)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def230]
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:39: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c: scope_hint: In function 'test_keylog_output'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:488:31: warning[-Wanalyzer-null-argument]: use of NULL 'token' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:231:18: note: in expansion of macro 'TEST_size_t_eq'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:231:18: note: in expansion of macro 'TEST_size_t_eq'
openssl-3.2.2-build/openssl-3.2.2/test/sslapitest.c:231:18: note: in expansion of macro 'TEST_size_t_eq'
<built-in>: note: argument 1 of '__builtin_strlen' must be non-null
#  486|   # define TEST_uint64_t_ge(a, b)  test_uint64_t_ge(__FILE__, __LINE__, #a, #b, a, b)
#  487|   
#  488|-> # define TEST_size_t_eq(a, b) test_size_t_eq(__FILE__, __LINE__, #a, #b, a, b)
#  489|   # define TEST_size_t_ne(a, b) test_size_t_ne(__FILE__, __LINE__, #a, #b, a, b)
#  490|   # define TEST_size_t_lt(a, b) test_size_t_lt(__FILE__, __LINE__, #a, #b, a, b)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def231]
openssl-3.2.2-build/openssl-3.2.2/test/testutil/stanza.c: scope_hint: In function 'test_readstanza'
openssl-3.2.2-build/openssl-3.2.2/test/testutil/stanza.c:98:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'p'
openssl-3.2.2-build/openssl-3.2.2/test/testutil/stanza.c:16: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
#   96|               return 0;
#   97|           }
#   98|->         *p = '\0';
#   99|   
#  100|           /* Blank line marks end of tests. */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def232]
openssl-3.2.2-build/openssl-3.2.2/test/testutil/stanza.c:113:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'equals'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
#  111|               return 0;
#  112|           }
#  113|->         *equals++ = '\0';
#  114|           if (!TEST_ptr(key = strip_spaces(s->buff))) {
#  115|               TEST_info("Empty field at line %d\n", s->curr);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def233]
openssl-3.2.2-build/openssl-3.2.2/test/testutil/stanza.c:121:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil.h:511:64: note: in definition of macro 'TEST_ptr'
openssl-3.2.2-build/openssl-3.2.2/test/testutil/stanza.c:12: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of 'strcmp' must be non-null
#  119|               value = "";
#  120|   
#  121|->         if (strcmp(key, "Title") == 0) {
#  122|               TEST_info("Starting \"%s\" tests at line %d", value, s->curr);
#  123|               continue;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def234]
openssl-3.2.2-build/openssl-3.2.2/test/timing_load_creds.c: scope_hint: In function 'main'
openssl-3.2.2-build/openssl-3.2.2/test/timing_load_creds.c:152:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'fopen(*av, "r")' where non-null expected
openssl-3.2.2-build/openssl-3.2.2/include/openssl/bio.h:30: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/openssl/pem.h:20: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/test/timing_load_creds.c:18: included_from: Included from here.
openssl-3.2.2-build/openssl-3.2.2/include/openssl/crypto.h:97:23: note: in definition of macro 'OPENSSL_malloc'
openssl-3.2.2-build/openssl-3.2.2/test/timing_load_creds.c:10: included_from: Included from here.
/usr/include/stdio.h:728:15: note: argument 4 of 'fread' must be non-null
#  150|       }
#  151|       fp = fopen(av[0], "r");
#  152|->     if ((long)fread(contents, 1, sb.st_size, fp) != sb.st_size) {
#  153|           perror("fread");
#  154|           exit(EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def235]
openssl-3.2.2-build/openssl-3.2.2/test/timing_load_creds.c:152:36: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(*av, "r")'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/crypto.h:97:23: note: in definition of macro 'OPENSSL_malloc'
#  150|       }
#  151|       fp = fopen(av[0], "r");
#  152|->     if ((long)fread(contents, 1, sb.st_size, fp) != sb.st_size) {
#  153|           perror("fread");
#  154|           exit(EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
openssl-3.2.2-build/openssl-3.2.2/test/timing_load_creds.c:152:36: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(*av, "r")'
openssl-3.2.2-build/openssl-3.2.2/include/openssl/crypto.h:97:23: note: in definition of macro 'OPENSSL_malloc'
#  150|       }
#  151|       fp = fopen(av[0], "r");
#  152|->     if ((long)fread(contents, 1, sb.st_size, fp) != sb.st_size) {
#  153|           perror("fread");
#  154|           exit(EXIT_FAILURE);

Error: CPPCHECK_WARNING (CWE-457): [#def237]
openssl-3.2.2-build/openssl-3.2.2/test/tls-provider.c:2894: warning[uninitvar]: Uninitialized variable: digest
# 2892|       }
# 2893|   
# 2894|->     return xor_sig_sign(vpxor_sigctx, sig, siglen, sigsize, digest, (size_t)dlen);
# 2895|           
# 2896|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def238]
openssl-3.2.2-build/openssl-3.2.2/test/tls-provider.c: scope_hint: In function 'tls_provider_init'
openssl-3.2.2-build/openssl-3.2.2/test/tls-provider.c:3259:10: warning[-Wanalyzer-jump-through-null]: jump through null pointer
# 3257|        * key & cert generation...
# 3258|        */
# 3259|->     if (!c_obj_create(handle, XORSIGALG_OID, XORSIGALG_NAME, XORSIGALG_NAME)) {
# 3260|           ERR_raise(ERR_LIB_USER, XORPROV_R_OBJ_CREATE_ERR);
# 3261|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def239]
openssl-3.2.2-build/openssl-3.2.2/test/tls-provider.c:3264:10: warning[-Wanalyzer-jump-through-null]: jump through null pointer
# 3262|       }
# 3263|   
# 3264|->     if (!c_obj_add_sigid(handle, XORSIGALG_OID, "", XORSIGALG_OID)) {
# 3265|           ERR_raise(ERR_LIB_USER, XORPROV_R_OBJ_CREATE_ERR);
# 3266|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def240]
openssl-3.2.2-build/openssl-3.2.2/test/tls-provider.c:3268:10: warning[-Wanalyzer-jump-through-null]: jump through null pointer
# 3266|           goto err;
# 3267|       }
# 3268|->     if (!c_obj_create(handle, XORSIGALG_HASH_OID, XORSIGALG_HASH_NAME, NULL)) {
# 3269|           ERR_raise(ERR_LIB_USER, XORPROV_R_OBJ_CREATE_ERR);
# 3270|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def241]
openssl-3.2.2-build/openssl-3.2.2/test/tls-provider.c:3273:10: warning[-Wanalyzer-jump-through-null]: jump through null pointer
# 3271|       }
# 3272|   
# 3273|->     if (!c_obj_add_sigid(handle, XORSIGALG_HASH_OID, XORSIGALG_HASH, XORSIGALG_HASH_OID)) {
# 3274|           ERR_raise(ERR_LIB_USER, XORPROV_R_OBJ_CREATE_ERR);
# 3275|           goto err;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def242]
openssl-3.2.2-build/openssl-3.2.2/test/tls13secretstest.c: scope_hint: In function 'test_handshake_secrets'
openssl-3.2.2-build/openssl-3.2.2/test/tls13secretstest.c:297:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 's'
#  295|           goto err;
#  296|   
#  297|->     s->session = SSL_SESSION_new();
#  298|       if (!TEST_ptr(s->session))
#  299|           goto err;

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-68.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameopenssl-3.2.2-8.fc42
store-results-to/tmp/tmpu4prmmc9/openssl-3.2.2-8.fc42.tar.xz
time-created2024-11-13 02:48:24
time-finished2024-11-13 03:20:59
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpu4prmmc9/openssl-3.2.2-8.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpu4prmmc9/openssl-3.2.2-8.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9