libgcrypt-1.11.0-4.fc42

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/usr/bin/libgcrypt-config:78:6: warning[SC2034]: optarg appears unused. Verify use (or export if used externally).
#   76|   	    ;;
#   77|   	*)
#   78|-> 	    optarg=""
#   79|   	    ;;
#   80|       esac

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:72:25: warning[-Wanalyzer-null-dereference]: dereference of NULL 'src'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/cipher-ccm.c: scope_hint: In function 'buf_cpy'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:228:7: note: in expansion of macro 'buf_put_he32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
#   70|   # define be_bswap64(x) ((u64)(x))
#   71|   #else
#   72|-> # define le_bswap32(x) ((u32)(x))
#   73|   # define be_bswap32(x) _gcry_bswap32(x)
#   74|   # define le_bswap64(x) ((u64)(x))

Error: GCC_ANALYZER_WARNING (CWE-126): [#def3]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:72:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:39: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:250:25: note: in expansion of macro 'buf_get_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:259:25: note: in expansion of macro 'buf_get_he32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:72:25: note: read of 3 bytes from after the end of 'scratch'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:72:25: note: valid subscripts for 'scratch' are '[0]' to '[8]'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
#   70|   # define be_bswap64(x) ((u64)(x))
#   71|   #else
#   72|-> # define le_bswap32(x) ((u32)(x))
#   73|   # define be_bswap32(x) _gcry_bswap32(x)
#   74|   # define le_bswap64(x) ((u64)(x))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:74:25: warning[-Wanalyzer-null-dereference]: dereference of NULL 'src'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/cipher-ccm.c: scope_hint: In function 'buf_cpy'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:220:7: note: in expansion of macro 'buf_put_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
#   72|   # define le_bswap32(x) ((u32)(x))
#   73|   # define be_bswap32(x) _gcry_bswap32(x)
#   74|-> # define le_bswap64(x) ((u64)(x))
#   75|   # define be_bswap64(x) _gcry_bswap64(x)
#   76|   #endif

Error: GCC_ANALYZER_WARNING (CWE-126): [#def5]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:74:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:250:25: note: in expansion of macro 'buf_get_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:250:25: note: in expansion of macro 'buf_get_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:74:25: note: read of 7 bytes from after the end of 'scratch'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bithelp.h:74:25: note: valid subscripts for 'scratch' are '[0]' to '[8]'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
#   72|   # define le_bswap32(x) ((u32)(x))
#   73|   # define be_bswap32(x) _gcry_bswap32(x)
#   74|-> # define le_bswap64(x) ((u64)(x))
#   75|   # define be_bswap64(x) _gcry_bswap64(x)
#   76|   #endif

Error: GCC_ANALYZER_WARNING (CWE-121): [#def6]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:150:10: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:250:25: note: in expansion of macro 'buf_get_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:259:25: note: in expansion of macro 'buf_get_he32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:138:10: note: in expansion of macro 'le_bswap32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:259:7: note: in expansion of macro 'buf_put_he32'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:150:10: note: write of 3 bytes to beyond the end of 'scratch'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:150:10: note: valid subscripts for 'scratch' are '[0]' to '[8]'
#  148|   {
#  149|     bufhelp_u32_t *out = _buf;
#  150|->   out->a = le_bswap32(val);
#  151|   }
#  152|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def7]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:180:10: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/salsa20.c:418:7: note: in expansion of macro 'gcry_assert'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:250:25: note: in expansion of macro 'buf_get_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:250:25: note: in expansion of macro 'buf_get_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:168:10: note: in expansion of macro 'le_bswap64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h: scope_hint: In function 'buf_xor'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:250:7: note: in expansion of macro 'buf_put_he64'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:180:10: note: write of 7 bytes to beyond the end of 'scratch'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:180:10: note: valid subscripts for 'scratch' are '[0]' to '[8]'
#  178|   {
#  179|     bufhelp_u64_t *out = _buf;
#  180|->   out->a = le_bswap64(val);
#  181|   }
#  182|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def8]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h: scope_hint: In function 'buf_cpy'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:213:7: warning[-Wanalyzer-null-argument]: use of NULL '_src' where non-null expected
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/cipher-ccm.c:26: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:211:11: note: in expansion of macro 'UNLIKELY'
<built-in>: note: argument 2 of '__builtin_memcpy' must be non-null
#  211|         if (UNLIKELY(len == 0))
#  212|   	return;
#  213|->       memcpy(_dst, _src, len);
#  214|         return;
#  215|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/bufhelp.h:236:14: warning[-Wanalyzer-null-dereference]: dereference of NULL 'src'
#  234|     /* Handle tail.  */
#  235|     for (; len; len--)
#  236|->     *dst++ = *src++;
#  237|   }
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def10]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/des.c: scope_hint: In function 'des_ecb_crypt'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/des.c:653:8: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*keys'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/des.c:1081:9: note: in expansion of macro 'des_ecb_encrypt'
#  651|     u32 *keys;
#  652|   
#  653|->   keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys;
#  654|   
#  655|     READ_64BIT_DATA (from, left, right)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c: scope_hint: In function 'reverse_buffer'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c:42:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'buffer'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c:31: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c:718:3: note: in expansion of macro 'point_init'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/visibility.h:36: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/g10lib.h:39: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c:26: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c:104:7: note: in expansion of macro 'mpi_test_bit'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c:28: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/ecc-eddsa.c:741:7: note: in expansion of macro 'DBG_CIPHER'
#   40|     for (i=0; i < length/2; i++)
#   41|       {
#   42|->       tmp = buffer[i];
#   43|         buffer[i] = buffer[length-1-i];
#   44|         buffer[length-1-i] = tmp;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/gostr3411-94.c: scope_hint: In function 'do_p'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/gostr3411-94.c:86:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 't[2]'
#   84|     k = 0;
#   85|     p[k+0] = ((t[0] >> (8*k)) & 0xff) << 0 |
#   86|->            ((t[2] >> (8*k)) & 0xff) << 8 |
#   87|              ((t[4] >> (8*k)) & 0xff) << 16 |
#   88|              ((t[6] >> (8*k)) & 0xff) << 24;

Error: CPPCHECK_WARNING (CWE-758): [#def13]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/mceliece6688128f.c:193: error[shiftTooManyBitsSigned]: Shifting signed 64-bit value by 63 bits is undefined behaviour
#  191|   static crypto_int64 crypto_int64_negative_mask(crypto_int64 crypto_int64_x)
#  192|   {
#  193|->   return crypto_int64_x >> (64-1);
#  194|   }
#  195|   

Error: CPPCHECK_WARNING (CWE-758): [#def14]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/mceliece6688128f.c:377: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  375|   static crypto_int32 crypto_int32_negative_mask(crypto_int32 crypto_int32_x)
#  376|   {
#  377|->   return crypto_int32_x >> (32-1);
#  378|   }
#  379|   

Error: CPPCHECK_WARNING (CWE-758): [#def15]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/mceliece6688128f.c:470: error[shiftTooManyBitsSigned]: Shifting signed 64-bit value by 63 bits is undefined behaviour
#  468|   static crypto_uint64_signed crypto_uint64_signed_negative_mask(crypto_uint64_signed crypto_uint64_signed_x)
#  469|   {
#  470|->   return crypto_uint64_signed_x >> (64-1);
#  471|   }
#  472|   

Error: CPPCHECK_WARNING (CWE-758): [#def16]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/mceliece6688128f.c:640: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  638|   static crypto_uint32_signed crypto_uint32_signed_negative_mask(crypto_uint32_signed crypto_uint32_signed_x)
#  639|   {
#  640|->   return crypto_uint32_signed_x >> (32-1);
#  641|   }
#  642|   

Error: CPPCHECK_WARNING (CWE-457): [#def17]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/md.c:550: warning[uninitvar]: Uninitialized variables: hd.ctx, hd.bufpos, hd.bufsize
#  548|       rc = md_open (&hd, algo, flags);
#  549|   
#  550|->   *h = rc? NULL : hd;
#  551|     return rc;
#  552|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/md.c: scope_hint: In function 'md_start_debug.part.0'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/md.c:1563:11: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&buf, "w")'
# 1561|     snprintf (buf, DIM(buf)-1, "dbgmd-%05d.%.10s", idx, suffix );
# 1562|     md->ctx->debug = fopen(buf, "w");
# 1563|->   if ( !md->ctx->debug )
# 1564|       log_debug("md debug: can't open %s\n", buf );
# 1565|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/md.c:1563:11: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&buf, "w")'
# 1561|     snprintf (buf, DIM(buf)-1, "dbgmd-%05d.%.10s", idx, suffix );
# 1562|     md->ctx->debug = fopen(buf, "w");
# 1563|->   if ( !md->ctx->debug )
# 1564|       log_debug("md debug: can't open %s\n", buf );
# 1565|   }

Error: CPPCHECK_WARNING (CWE-457): [#def20]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/poly1305.c:838: warning[uninitvar]: Uninitialized variable: all_msg
#  836|         for (j = 0; j < i; j++)
#  837|   	all_msg[j] = i;
#  838|->       poly1305_auth (mac, all_msg, i, all_key);
#  839|         _gcry_poly1305_update (&total_ctx, mac, 16);
#  840|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def21]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/rfc2268.c: scope_hint: In function 'do_encrypt'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/rfc2268.c:108:59: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*(RFC2268_context *)context.S[j]'
#  106|         j = i * 4;
#  107|         /* For some reason I cannot combine those steps. */
#  108|->       word0 += (word1 & ~word3) + (word2 & word3) + ctx->S[j];
#  109|         word0 = rotl16(word0, 1);
#  110|   

Error: CPPCHECK_WARNING (CWE-758): [#def22]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:350: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  348|     x4 = GETU32 (inbuf+12);
#  349|   
#  350|->   OP (x1, x2, x3, x4, 0);
#  351|     OP (x3, x4, x1, x2, 2);
#  352|     OP (x1, x2, x3, x4, 4);

Error: CPPCHECK_WARNING (CWE-758): [#def23]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:351: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  349|   
#  350|     OP (x1, x2, x3, x4, 0);
#  351|->   OP (x3, x4, x1, x2, 2);
#  352|     OP (x1, x2, x3, x4, 4);
#  353|     OP (x3, x4, x1, x2, 6);

Error: CPPCHECK_WARNING (CWE-758): [#def24]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:352: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  350|     OP (x1, x2, x3, x4, 0);
#  351|     OP (x3, x4, x1, x2, 2);
#  352|->   OP (x1, x2, x3, x4, 4);
#  353|     OP (x3, x4, x1, x2, 6);
#  354|     OP (x1, x2, x3, x4, 8);

Error: CPPCHECK_WARNING (CWE-758): [#def25]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:353: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  351|     OP (x3, x4, x1, x2, 2);
#  352|     OP (x1, x2, x3, x4, 4);
#  353|->   OP (x3, x4, x1, x2, 6);
#  354|     OP (x1, x2, x3, x4, 8);
#  355|     OP (x3, x4, x1, x2, 10);

Error: CPPCHECK_WARNING (CWE-758): [#def26]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:354: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  352|     OP (x1, x2, x3, x4, 4);
#  353|     OP (x3, x4, x1, x2, 6);
#  354|->   OP (x1, x2, x3, x4, 8);
#  355|     OP (x3, x4, x1, x2, 10);
#  356|     OP (x1, x2, x3, x4, 12);

Error: CPPCHECK_WARNING (CWE-758): [#def27]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:355: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  353|     OP (x3, x4, x1, x2, 6);
#  354|     OP (x1, x2, x3, x4, 8);
#  355|->   OP (x3, x4, x1, x2, 10);
#  356|     OP (x1, x2, x3, x4, 12);
#  357|     OP (x3, x4, x1, x2, 14);

Error: CPPCHECK_WARNING (CWE-758): [#def28]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:356: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  354|     OP (x1, x2, x3, x4, 8);
#  355|     OP (x3, x4, x1, x2, 10);
#  356|->   OP (x1, x2, x3, x4, 12);
#  357|     OP (x3, x4, x1, x2, 14);
#  358|     OP (x1, x2, x3, x4, 16);

Error: CPPCHECK_WARNING (CWE-758): [#def29]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:357: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  355|     OP (x3, x4, x1, x2, 10);
#  356|     OP (x1, x2, x3, x4, 12);
#  357|->   OP (x3, x4, x1, x2, 14);
#  358|     OP (x1, x2, x3, x4, 16);
#  359|     OP (x3, x4, x1, x2, 18);

Error: CPPCHECK_WARNING (CWE-758): [#def30]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:358: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  356|     OP (x1, x2, x3, x4, 12);
#  357|     OP (x3, x4, x1, x2, 14);
#  358|->   OP (x1, x2, x3, x4, 16);
#  359|     OP (x3, x4, x1, x2, 18);
#  360|     OP (x1, x2, x3, x4, 20);

Error: CPPCHECK_WARNING (CWE-758): [#def31]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:359: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  357|     OP (x3, x4, x1, x2, 14);
#  358|     OP (x1, x2, x3, x4, 16);
#  359|->   OP (x3, x4, x1, x2, 18);
#  360|     OP (x1, x2, x3, x4, 20);
#  361|     OP (x3, x4, x1, x2, 22);

Error: CPPCHECK_WARNING (CWE-758): [#def32]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:360: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  358|     OP (x1, x2, x3, x4, 16);
#  359|     OP (x3, x4, x1, x2, 18);
#  360|->   OP (x1, x2, x3, x4, 20);
#  361|     OP (x3, x4, x1, x2, 22);
#  362|     OP (x1, x2, x3, x4, 24);

Error: CPPCHECK_WARNING (CWE-758): [#def33]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:361: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  359|     OP (x3, x4, x1, x2, 18);
#  360|     OP (x1, x2, x3, x4, 20);
#  361|->   OP (x3, x4, x1, x2, 22);
#  362|     OP (x1, x2, x3, x4, 24);
#  363|     OP (x3, x4, x1, x2, 26);

Error: CPPCHECK_WARNING (CWE-758): [#def34]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:362: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  360|     OP (x1, x2, x3, x4, 20);
#  361|     OP (x3, x4, x1, x2, 22);
#  362|->   OP (x1, x2, x3, x4, 24);
#  363|     OP (x3, x4, x1, x2, 26);
#  364|     OP (x1, x2, x3, x4, 28);

Error: CPPCHECK_WARNING (CWE-758): [#def35]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:363: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  361|     OP (x3, x4, x1, x2, 22);
#  362|     OP (x1, x2, x3, x4, 24);
#  363|->   OP (x3, x4, x1, x2, 26);
#  364|     OP (x1, x2, x3, x4, 28);
#  365|     OP (x3, x4, x1, x2, 30);

Error: CPPCHECK_WARNING (CWE-758): [#def36]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:364: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  362|     OP (x1, x2, x3, x4, 24);
#  363|     OP (x3, x4, x1, x2, 26);
#  364|->   OP (x1, x2, x3, x4, 28);
#  365|     OP (x3, x4, x1, x2, 30);
#  366|   

Error: CPPCHECK_WARNING (CWE-758): [#def37]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:365: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  363|     OP (x3, x4, x1, x2, 26);
#  364|     OP (x1, x2, x3, x4, 28);
#  365|->   OP (x3, x4, x1, x2, 30);
#  366|   
#  367|     PUTU32 (outbuf, x3);

Error: CPPCHECK_WARNING (CWE-758): [#def38]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:396: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  394|     x4 = GETU32 (inbuf+12);
#  395|   
#  396|->   OP (x1, x2, x3, x4, 30);
#  397|     OP (x3, x4, x1, x2, 28);
#  398|     OP (x1, x2, x3, x4, 26);

Error: CPPCHECK_WARNING (CWE-758): [#def39]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:397: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  395|   
#  396|     OP (x1, x2, x3, x4, 30);
#  397|->   OP (x3, x4, x1, x2, 28);
#  398|     OP (x1, x2, x3, x4, 26);
#  399|     OP (x3, x4, x1, x2, 24);

Error: CPPCHECK_WARNING (CWE-758): [#def40]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:398: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  396|     OP (x1, x2, x3, x4, 30);
#  397|     OP (x3, x4, x1, x2, 28);
#  398|->   OP (x1, x2, x3, x4, 26);
#  399|     OP (x3, x4, x1, x2, 24);
#  400|     OP (x1, x2, x3, x4, 22);

Error: CPPCHECK_WARNING (CWE-758): [#def41]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:399: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  397|     OP (x3, x4, x1, x2, 28);
#  398|     OP (x1, x2, x3, x4, 26);
#  399|->   OP (x3, x4, x1, x2, 24);
#  400|     OP (x1, x2, x3, x4, 22);
#  401|     OP (x3, x4, x1, x2, 20);

Error: CPPCHECK_WARNING (CWE-758): [#def42]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:400: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  398|     OP (x1, x2, x3, x4, 26);
#  399|     OP (x3, x4, x1, x2, 24);
#  400|->   OP (x1, x2, x3, x4, 22);
#  401|     OP (x3, x4, x1, x2, 20);
#  402|     OP (x1, x2, x3, x4, 18);

Error: CPPCHECK_WARNING (CWE-758): [#def43]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:401: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  399|     OP (x3, x4, x1, x2, 24);
#  400|     OP (x1, x2, x3, x4, 22);
#  401|->   OP (x3, x4, x1, x2, 20);
#  402|     OP (x1, x2, x3, x4, 18);
#  403|     OP (x3, x4, x1, x2, 16);

Error: CPPCHECK_WARNING (CWE-758): [#def44]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:402: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  400|     OP (x1, x2, x3, x4, 22);
#  401|     OP (x3, x4, x1, x2, 20);
#  402|->   OP (x1, x2, x3, x4, 18);
#  403|     OP (x3, x4, x1, x2, 16);
#  404|     OP (x1, x2, x3, x4, 14);

Error: CPPCHECK_WARNING (CWE-758): [#def45]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:403: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  401|     OP (x3, x4, x1, x2, 20);
#  402|     OP (x1, x2, x3, x4, 18);
#  403|->   OP (x3, x4, x1, x2, 16);
#  404|     OP (x1, x2, x3, x4, 14);
#  405|     OP (x3, x4, x1, x2, 12);

Error: CPPCHECK_WARNING (CWE-758): [#def46]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:404: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  402|     OP (x1, x2, x3, x4, 18);
#  403|     OP (x3, x4, x1, x2, 16);
#  404|->   OP (x1, x2, x3, x4, 14);
#  405|     OP (x3, x4, x1, x2, 12);
#  406|     OP (x1, x2, x3, x4, 10);

Error: CPPCHECK_WARNING (CWE-758): [#def47]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:405: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  403|     OP (x3, x4, x1, x2, 16);
#  404|     OP (x1, x2, x3, x4, 14);
#  405|->   OP (x3, x4, x1, x2, 12);
#  406|     OP (x1, x2, x3, x4, 10);
#  407|     OP (x3, x4, x1, x2, 8);

Error: CPPCHECK_WARNING (CWE-758): [#def48]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:406: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  404|     OP (x1, x2, x3, x4, 14);
#  405|     OP (x3, x4, x1, x2, 12);
#  406|->   OP (x1, x2, x3, x4, 10);
#  407|     OP (x3, x4, x1, x2, 8);
#  408|     OP (x1, x2, x3, x4, 6);

Error: CPPCHECK_WARNING (CWE-758): [#def49]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:407: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  405|     OP (x3, x4, x1, x2, 12);
#  406|     OP (x1, x2, x3, x4, 10);
#  407|->   OP (x3, x4, x1, x2, 8);
#  408|     OP (x1, x2, x3, x4, 6);
#  409|     OP (x3, x4, x1, x2, 4);

Error: CPPCHECK_WARNING (CWE-758): [#def50]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:408: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  406|     OP (x1, x2, x3, x4, 10);
#  407|     OP (x3, x4, x1, x2, 8);
#  408|->   OP (x1, x2, x3, x4, 6);
#  409|     OP (x3, x4, x1, x2, 4);
#  410|     OP (x1, x2, x3, x4, 2);

Error: CPPCHECK_WARNING (CWE-758): [#def51]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:409: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  407|     OP (x3, x4, x1, x2, 8);
#  408|     OP (x1, x2, x3, x4, 6);
#  409|->   OP (x3, x4, x1, x2, 4);
#  410|     OP (x1, x2, x3, x4, 2);
#  411|     OP (x3, x4, x1, x2, 0);

Error: CPPCHECK_WARNING (CWE-758): [#def52]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:410: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  408|     OP (x1, x2, x3, x4, 6);
#  409|     OP (x3, x4, x1, x2, 4);
#  410|->   OP (x1, x2, x3, x4, 2);
#  411|     OP (x3, x4, x1, x2, 0);
#  412|   

Error: CPPCHECK_WARNING (CWE-758): [#def53]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/seed.c:411: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  409|     OP (x3, x4, x1, x2, 4);
#  410|     OP (x1, x2, x3, x4, 2);
#  411|->   OP (x3, x4, x1, x2, 0);
#  412|   
#  413|     PUTU32 (outbuf, x3);

Error: COMPILER_WARNING: [#def54]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/serpent-avx512-x86.c: scope_hint: In function 'ocb_input'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/cipher/serpent-avx512-x86.c:695:1: warning[-Wpsabi]: AVX512F vector return without AVX512F enabled changes the ABI
#  693|   ocb_input(__m512i *vchecksum, __m128i *voffset, const unsigned char *input,
#  694|   	  unsigned char *output, const ocb_L_uintptr_t L[4])
#  695|-> {
#  696|     __m128i L0 = _mm_loadu_si128((const void *)(uintptr_t)L[0]);
#  697|     __m128i L1 = _mm_loadu_si128((const void *)(uintptr_t)L[1]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def55]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c: scope_hint: In function '_gcry_mpi_set'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-internal.h:94:21: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:495:3: note: in expansion of macro 'MPN_COPY'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:492:3: note: in expansion of macro 'RESIZE_IF_NEEDED'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:492:3: note: in expansion of macro 'RESIZE_IF_NEEDED'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:495:3: note: in expansion of macro 'MPN_COPY'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:495:3: note: in expansion of macro 'MPN_COPY'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:495:3: note: in expansion of macro 'MPN_COPY'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:495:3: note: in expansion of macro 'MPN_COPY'
#   92|   	mpi_size_t _i;			\
#   93|   	for( _i = 0; _i < (n); _i++ )	\
#   94|-> 	    (d)[_i] = (s)[_i];		\
#   95|       } while(0)
#   96|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def56]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c: scope_hint: In function '_gcry_mpi_mod_sec'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-internal.h:179:36: warning[-Wanalyzer-deref-before-check]: check of 'a' for NULL after already dereferencing it
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:359:26: note: in expansion of macro 'mpi_alloc_limb_space'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:359:26: note: in expansion of macro 'mpi_alloc_limb_space'
#  177|   
#  178|   /*-- mpiutil.c --*/
#  179|-> #define mpi_alloc_limb_space(n,f)  _gcry_mpi_alloc_limb_space((n),(f))
#  180|   mpi_ptr_t _gcry_mpi_alloc_limb_space( unsigned nlimbs, int sec );
#  181|   void _gcry_mpi_free_limb_space( mpi_ptr_t a, unsigned int nlimbs );

Error: GCC_ANALYZER_WARNING (CWE-465): [#def57]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:145:8: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:123:19: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:123:19: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:127:19: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:127:19: note: in expansion of macro 'mpi_is_secure'
#  143|       /* Ensure W has space enough to store the result.  */
#  144|       wsize = usize + vsize;
#  145|->     if ( !mpi_is_secure (w) && (mpi_is_secure (u) || mpi_is_secure (v)) ) {
#  146|           /* w is not allocated in secure space but u or v is.  To make sure
#  147|            * that no temporray results are stored in w, we temporary use

Error: GCC_ANALYZER_WARNING (CWE-465): [#def58]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:257:6: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:233:17: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:233:17: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:237:17: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:237:17: note: in expansion of macro 'mpi_is_secure'
#  255|     /* Ensure W has space enough to store the result.  */
#  256|     wsize = usize + vsize;
#  257|->   if (!mpi_is_secure (w) && (mpi_is_secure (u) || mpi_is_secure (v)))
#  258|       {
#  259|         /* w is not allocated in secure space but u or v is.  To make sure

Error: GCC_ANALYZER_WARNING (CWE-476): [#def59]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c: scope_hint: In function '_gcry_mpi_neg'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:407:11: warning[-Wanalyzer-null-dereference]: dereference of NULL 'w'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/visibility.h:36: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/g10lib.h:39: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:27: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:400:5: note: in expansion of macro 'mpi_set'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:400:5: note: in expansion of macro 'mpi_set'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:28: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:492:3: note: in expansion of macro 'RESIZE_IF_NEEDED'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:492:3: note: in expansion of macro 'RESIZE_IF_NEEDED'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:495:3: note: in expansion of macro 'MPN_COPY'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:400:5: note: in expansion of macro 'mpi_set'
#  405|       }
#  406|   
#  407|->   w->sign = !u->sign;
#  408|   }
#  409|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def60]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c: scope_hint: In function '_gcry_mpi_randomize'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:702:9: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-internal.h:52: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:695:7: note: in expansion of macro 'mpi_is_immutable'
#  700|     if (level == GCRY_WEAK_RANDOM)
#  701|       {
#  702|->       p = mpi_is_secure(w) ? xmalloc_secure (nbytes)
#  703|                              : xmalloc (nbytes);
#  704|         _gcry_create_nonce (p, nbytes);

Error: GCC_ANALYZER_WARNING (CWE-465): [#def61]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:708:9: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpiutil.c:695:7: note: in expansion of macro 'mpi_is_immutable'
#  706|     else
#  707|       {
#  708|->       p = mpi_is_secure(w) ? _gcry_random_bytes_secure (nbytes, level)
#  709|                              : _gcry_random_bytes (nbytes, level);
#  710|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def62]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c:40: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c: scope_hint: In function 'secmem_dump_stats_internal'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/g10lib.h:205:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mb'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c:894:13: note: in expansion of macro 'log_info'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c: scope_hint: In function 'secmem_dump_stats_internal'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c:894:13: note: in expansion of macro 'log_info'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c:894:13: note: in expansion of macro 'log_info'
#  203|   #define log_fatal   _gcry_log_fatal
#  204|   #define log_error   _gcry_log_error
#  205|-> #define log_info    _gcry_log_info
#  206|   #define log_debug   _gcry_log_debug
#  207|   #define log_printf  _gcry_log_printf

Error: GCC_ANALYZER_WARNING (CWE-457): [#def63]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/hmac256.c: scope_hint: In function ‘transform’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/hmac256.c:143:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘w[<unknown>]’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/hmac256.c:211:12: note: in expansion of macro ‘S1’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/hmac256.c:143:22: note: in definition of macro ‘S1’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/hmac256.c:211:12: note: in expansion of macro ‘S1’
#  141|   #define Sum1(x) (ror ((x), 6) ^ ror ((x), 11) ^ ror ((x), 25))  /* (4.5) */
#  142|   #define S0(x) (ror ((x), 7) ^ ror ((x), 18) ^ ((x) >> 3))       /* (4.6) */
#  143|-> #define S1(x) (ror ((x), 17) ^ ror ((x), 19) ^ ((x) >> 10))     /* (4.7) */
#  144|   #define R(a,b,c,d,e,f,g,h,k,w) do                                 \
#  145|             {                                                       \

Error: GCC_ANALYZER_WARNING (CWE-465): [#def64]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/mpi.h:115:36: warning[-Wanalyzer-deref-before-check]: check of 'u' for NULL after already dereferencing it
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:127:19: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:123:19: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:123:19: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:127:19: note: in expansion of macro 'mpi_is_secure'
#  113|   #define mpi_is_immutable(a)   ((a)->flags&16)
#  114|   #define mpi_is_opaque(a)      ((a) && ((a)->flags&4))
#  115|-> #define mpi_is_secure(a)      ((a) && ((a)->flags&1))
#  116|   #define mpi_clear(a)          _gcry_mpi_clear ((a))
#  117|   #define mpi_alloc_like(a)     _gcry_mpi_alloc_like((a))

Error: GCC_ANALYZER_WARNING (CWE-465): [#def65]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-internal.h:52: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:30: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c: scope_hint: In function '_gcry_mpi_mul'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/mpi.h:115:36: warning[-Wanalyzer-deref-before-check]: check of 'v' for NULL after already dereferencing it
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:123:19: note: in expansion of macro 'mpi_is_secure'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/mpi/mpi-mul.c:123:19: note: in expansion of macro 'mpi_is_secure'
#  113|   #define mpi_is_immutable(a)   ((a)->flags&16)
#  114|   #define mpi_is_opaque(a)      ((a) && ((a)->flags&4))
#  115|-> #define mpi_is_secure(a)      ((a) && ((a)->flags&1))
#  116|   #define mpi_clear(a)          _gcry_mpi_clear ((a))
#  117|   #define mpi_alloc_like(a)     _gcry_mpi_alloc_like((a))

Error: CPPCHECK_WARNING (CWE-457): [#def66]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/mpicalc.c:80: error[uninitvar]: Uninitialized variable: buf
#   78|     else
#   79|       {
#   80|->       fputs (buf, stdout);
#   81|         gcry_free (buf);
#   82|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c:187:72: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mb_prev'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c: scope_hint: In function 'mb_get_prev'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c: scope_hint: In function 'mb_get_prev'
#  185|     memblock_t *mb_next;
#  186|   
#  187|->   mb_next = (memblock_t *) (void *) ((char *) mb + BLOCK_HEAD_SIZE + mb->size);
#  188|   
#  189|     if (! ptr_into_pool_p (pool, mb_next))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def68]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c: scope_hint: In function 'mb_get_new'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c:246:14: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mb'
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/secmem.c: scope_hint: In function 'mb_get_new'
#  244|   
#  245|     for (mb = block; ptr_into_pool_p (pool, mb); mb = mb_get_next (pool, mb))
#  246|->     if (! (mb->flags & MB_FLAG_ACTIVE) && mb->size >= size)
#  247|         {
#  248|   	/* Found a free block.  */

Error: CPPCHECK_WARNING (CWE-457): [#def69]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/basic.c:17716: warning[uninitvar]: Uninitialized variable: pkey
#17714|       die ("converting sample key failed: %s\n", gpg_strerror (err));
#17715|   
#17716|->   do_check_one_pubkey (n, skey, pkey,
#17717|                          (const unsigned char*)spec.key.grip,
#17718|   		       spec.id, spec.flags);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c: scope_hint: In function ‘read_public_key_file’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:304:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname,  <unknown>)’
#  302|           buffer = gcry_xrealloc (buffer, bufsize);
#  303|   
#  304|->       nread = fread (buffer + buflen, 1, NCHUNK, fp);
#  305|         if (nread < NCHUNK && ferror (fp))
#  306|           {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c: scope_hint: In function ‘read_sexp_from_file’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:304:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "rb")’
#  302|           buffer = gcry_xrealloc (buffer, bufsize);
#  303|   
#  304|->       nread = fread (buffer + buflen, 1, NCHUNK, fp);
#  305|         if (nread < NCHUNK && ferror (fp))
#  306|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:304:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname,  <unknown>)’
#  302|           buffer = gcry_xrealloc (buffer, bufsize);
#  303|   
#  304|->       nread = fread (buffer + buflen, 1, NCHUNK, fp);
#  305|         if (nread < NCHUNK && ferror (fp))
#  306|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:304:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "rb")’
#  302|           buffer = gcry_xrealloc (buffer, bufsize);
#  303|   
#  304|->       nread = fread (buffer + buflen, 1, NCHUNK, fp);
#  305|         if (nread < NCHUNK && ferror (fp))
#  306|           {

Error: GCC_ANALYZER_WARNING (CWE-617): [#def74]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:531:5: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
#  529|     buffer = read_file (fp, 0, &buflen);
#  530|     if (!buffer)
#  531|->     die ("error reading `%s'\n", fname);
#  532|     fclose (fp);
#  533|   

Error: GCC_ANALYZER_WARNING (CWE-617): [#def75]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c: scope_hint: In function ‘read_public_key_file’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:623:5: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
#  621|     buffer = read_file (fp, 0, &buflen);
#  622|     if (!buffer)
#  623|->     die ("error reading `%s'\n", fname);
#  624|     fclose (fp);
#  625|   

Error: CPPCHECK_WARNING (CWE-457): [#def76]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:723: warning[uninitvar]: Uninitialized variable: s_sig
#  721|     gcry_free (buffer);
#  722|   
#  723|->   return s_sig;
#  724|   }
#  725|   

Error: GCC_ANALYZER_WARNING (CWE-617): [#def77]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c: scope_hint: In function ‘read_sexp_from_file’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:742:5: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
#  740|     buffer = read_file (fp, 0, &buflen);
#  741|     if (!buffer)
#  742|->     die ("error reading `%s'\n", fname);
#  743|     fclose (fp);
#  744|     if (!buflen)

Error: CPPCHECK_WARNING (CWE-457): [#def78]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:1147: error[legacyUninitvar]: Uninitialized variable: last_output
# 1145|     for (count=0; count < iterations; count++)
# 1146|       {
# 1147|->       memcpy (last_last_output, last_output, sizeof last_output);
# 1148|         memcpy (last_output, output, sizeof output);
# 1149|   

Error: CPPCHECK_WARNING (CWE-457): [#def79]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:1270: warning[uninitvar]: Uninitialized variable: s_keyspec
# 1268|            gpg_strerror (err));
# 1269|   
# 1270|->   err = gcry_pk_genkey (&s_key, s_keyspec);
# 1271|     if (err)
# 1272|       die ("gcry_pk_genkey failed for RSA: %s\n", gpg_strerror (err));

Error: CPPCHECK_WARNING (CWE-457): [#def80]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:1333: warning[uninitvar]: Uninitialized variable: s_keyspec
# 1331|            gpg_strerror (err));
# 1332|   
# 1333|->   err = gcry_pk_genkey (&s_key, s_keyspec);
# 1334|   
# 1335|     gcry_sexp_release (s_keyspec);

Error: CPPCHECK_WARNING (CWE-457): [#def81]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:2013: warning[uninitvar]: Uninitialized variable: s_data
# 2011|     s_key = read_sexp_from_file (keyfile);
# 2012|   
# 2013|->   err = gcry_pk_sign (&s_sig, s_data, s_key);
# 2014|     if (err)
# 2015|       {

Error: CPPCHECK_WARNING (CWE-457): [#def82]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:2108: warning[uninitvar]: Uninitialized variable: s_data
# 2106|     s_sig = read_sexp_from_file (sigfile);
# 2107|   
# 2108|->   err = gcry_pk_verify (s_sig, s_data, s_key);
# 2109|     if (!err)
# 2110|       puts ("GOOD signature");

Error: CPPCHECK_WARNING (CWE-457): [#def83]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:2151: warning[uninitvar]: Uninitialized variable: s_data
# 2149|            gpg_strerror (err));
# 2150|   
# 2151|->   err = gcry_pk_sign (&s_sig, s_data, s_key);
# 2152|     if (err)
# 2153|       {

Error: CPPCHECK_WARNING (CWE-457): [#def84]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/fipsdrv.c:2227: warning[uninitvar]: Uninitialized variable: s_data
# 2225|     s_sig = read_sexp_from_file (sigfile);
# 2226|   
# 2227|->   err = gcry_pk_verify (s_sig, s_data, s_key);
# 2228|     if (!err)
# 2229|       puts ("GOOD signature");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def85]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c: scope_hint: In function ‘main’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:96:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:35: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:46:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:46:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:50:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:50:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:52:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:52:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:54:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:54:3: note: in expansion of macro ‘xgcry_control’
#   94|         unsigned char *h;
#   95|         if (!strcmp (*argv, "-"))
#   96|->         fp = stdin;
#   97|         else
#   98|           fp = fopen (*argv, "r");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:96:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:46:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:46:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:50:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:50:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:52:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:52:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:54:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/gchash.c:54:3: note: in expansion of macro ‘xgcry_control’
#   94|         unsigned char *h;
#   95|         if (!strcmp (*argv, "-"))
#   96|->         fp = stdin;
#   97|         else
#   98|           fp = fopen (*argv, "r");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def87]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c: scope_hint: In function ‘cmp_digest’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:395:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:35: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:629:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:629:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:634:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:635:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:635:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/src/gcrypt-int.h:27: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:30: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:652:14: note: in expansion of macro ‘gcry_md_test_algo’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:333:12: note: in expansion of macro ‘hexdigitp’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/hashtest.c:27: included_from: Included from here.
/usr/include/string.h:64:12: note: argument 1 of ‘memcmp’ must be non-null
#  393|         return 1;
#  394|       }
#  395|->   if (memcmp (tv_digest, digest, tv_digestlen))
#  396|       {
#  397|         fail ("%d GiB %+3d %-10s error: %s",

Error: CPPCHECK_WARNING (CWE-457): [#def88]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/keygen.c:89: error[uninitvar]: Uninitialized variable: buf
#   87|     else
#   88|       {
#   89|->       fprintf (stderr, "%s\n", buf);
#   90|         gcry_free (buf);
#   91|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c: scope_hint: In function ‘check_forking’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:201:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[in_recursion]’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:38: included_from: Included from here.
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:764:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:764:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:781:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:781:3: note: in expansion of macro ‘xgcry_control’
#  199|       die ("parent and child got the same random number\n");
#  200|   #endif  /*!HAVE_W32_SYSTEM*/
#  201|-> }
#  202|   
#  203|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c: scope_hint: In function ‘check_nonce_forking’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:268:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[in_recursion]’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:764:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:764:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:781:3: note: in expansion of macro ‘xgcry_control’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/random.c:781:3: note: in expansion of macro ‘xgcry_control’
#  266|       die ("parent and child got the same nonce\n");
#  267|   #endif  /*!HAVE_W32_SYSTEM*/
#  268|-> }
#  269|   
#  270|   

Error: CPPCHECK_WARNING (CWE-457): [#def91]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/t-convert.c:118: error[uninitvar]: Uninitialized variable: buf
#  116|                 fmts[i].name,gpg_strerror (err) );
#  117|         else
#  118|->         gcry_free (buf);
#  119|       }
#  120|   

Error: CPPCHECK_WARNING (CWE-457): [#def92]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/t-cv25519.c:51: error[uninitvar]: Uninitialized variable: buf
#   49|     else
#   50|       {
#   51|->       fprintf (stderr, "%s: %s\n", text, buf);
#   52|         gcry_free (buf);
#   53|       }

Error: CPPCHECK_WARNING (CWE-457): [#def93]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/t-mpi-point.c:161: error[uninitvar]: Uninitialized variable: buf
#  159|     else
#  160|       {
#  161|->       fprintf (stderr, "%s%s: %s\n", text, text2? text2:"", buf);
#  162|         gcry_free (buf);
#  163|       }

Error: CPPCHECK_WARNING (CWE-457): [#def94]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/t-x448.c:52: error[uninitvar]: Uninitialized variable: buf
#   50|     else
#   51|       {
#   52|->       fprintf (stderr, "%s: %s\n", text, buf);
#   53|         gcry_free (buf);
#   54|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c: scope_hint: In function ‘my_spawn’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:105:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:540:7: note: in expansion of macro ‘xfree’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:540:7: note: in expansion of macro ‘xfree’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:540:7: note: in expansion of macro ‘xfree’
#  103|   #endif
#  104|   #define DIMof(type,member)   DIM(((type *)0)->member)
#  105|-> #define xfree(a)      free ((a))
#  106|   #define spacep(p)   (*(p) == ' ' || *(p) == '\t')
#  107|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c: scope_hint: In function ‘strtokenize’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:106:22: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(bytes)’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:320:10: note: in expansion of macro ‘spacep’
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:320:10: note: in expansion of macro ‘spacep’
#  104|   #define DIMof(type,member)   DIM(((type *)0)->member)
#  105|   #define xfree(a)      free ((a))
#  106|-> #define spacep(p)   (*(p) == ' ' || *(p) == '\t')
#  107|   
#  108|   /* If we have a decent libgpg-error we can use some gcc attributes.  */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def97]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:559:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
#  557|             die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  558|           }
#  559|->       if (fd != 0 && dup2 (fd, 0) == -1)
#  560|           {
#  561|             xfree (arg_list);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def98]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:559:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 0), 0)’
#  557|             die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  558|           }
#  559|->       if (fd != 0 && dup2 (fd, 0) == -1)
#  560|           {
#  561|             xfree (arg_list);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def99]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:559:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
#  557|             die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  558|           }
#  559|->       if (fd != 0 && dup2 (fd, 0) == -1)
#  560|           {
#  561|             xfree (arg_list);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def100]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:573:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
#  571|                 die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  572|               }
#  573|->           if (fd != 1 && dup2 (fd, 1) == -1)
#  574|               {
#  575|                 xfree (arg_list);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:573:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 0), 1)’
#  571|                 die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  572|               }
#  573|->           if (fd != 1 && dup2 (fd, 1) == -1)
#  574|               {
#  575|                 xfree (arg_list);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
libgcrypt-1.11.0-build/libgcrypt-1.11.0/tests/testdrv.c:573:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
#  571|                 die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  572|               }
#  573|->           if (fd != 1 && dup2 (fd, 1) == -1)
#  574|               {
#  575|                 xfree (arg_list);

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-180.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibgcrypt-1.11.0-4.fc42
store-results-to/tmp/tmp4p5dqqwr/libgcrypt-1.11.0-4.fc42.tar.xz
time-created2024-11-13 01:24:08
time-finished2024-11-13 01:27:19
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp4p5dqqwr/libgcrypt-1.11.0-4.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp4p5dqqwr/libgcrypt-1.11.0-4.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9