libgcrypt-1.11.2-1.fc44

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.2/cipher/bufhelp.h:138:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 'src'
libgcrypt-1.11.2/cipher/cipher-ccm.c:264:1: enter_function: entry to '_gcry_cipher_ccm_tag'
libgcrypt-1.11.2/cipher/cipher-ccm.c:274:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:277:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:7: branch_false: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:6: branch_true: following 'true' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: branch_true: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: call_function: calling 'do_cbc_mac' from '_gcry_cipher_ccm_tag'
#  136|   static inline u32 buf_get_le32(const void *_buf)
#  137|   {
#  138|->   return le_bswap32(((const bufhelp_u32_t *)_buf)->a);
#  139|   }
#  140|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def3]
libgcrypt-1.11.2/cipher/bufhelp.h:138:10: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libgcrypt-1.11.2/cipher/salsa20.c:505:1: enter_function: entry to 'selftest'
libgcrypt-1.11.2/cipher/salsa20.c:528:3: call_function: calling 'salsa20_setkey' from 'selftest'
#  136|   static inline u32 buf_get_le32(const void *_buf)
#  137|   {
#  138|->   return le_bswap32(((const bufhelp_u32_t *)_buf)->a);
#  139|   }
#  140|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def4]
libgcrypt-1.11.2/cipher/bufhelp.h:150:3: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
libgcrypt-1.11.2/cipher/salsa20.c:505:1: enter_function: entry to 'selftest'
libgcrypt-1.11.2/cipher/salsa20.c:528:3: call_function: calling 'salsa20_setkey' from 'selftest'
#  148|   {
#  149|     bufhelp_u32_t *out = _buf;
#  150|->   out->a = le_bswap32(val);
#  151|   }
#  152|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
libgcrypt-1.11.2/cipher/bufhelp.h:168:10: warning[-Wanalyzer-null-dereference]: dereference of NULL 'src'
libgcrypt-1.11.2/cipher/cipher-ccm.c:264:1: enter_function: entry to '_gcry_cipher_ccm_tag'
libgcrypt-1.11.2/cipher/cipher-ccm.c:274:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:277:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:7: branch_false: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:6: branch_true: following 'true' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: branch_true: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: call_function: calling 'do_cbc_mac' from '_gcry_cipher_ccm_tag'
#  166|   static inline u64 buf_get_le64(const void *_buf)
#  167|   {
#  168|->   return le_bswap64(((const bufhelp_u64_t *)_buf)->a);
#  169|   }
#  170|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def6]
libgcrypt-1.11.2/cipher/bufhelp.h:168:10: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libgcrypt-1.11.2/cipher/salsa20.c:505:1: enter_function: entry to 'selftest'
libgcrypt-1.11.2/cipher/salsa20.c:528:3: call_function: calling 'salsa20_setkey' from 'selftest'
#  166|   static inline u64 buf_get_le64(const void *_buf)
#  167|   {
#  168|->   return le_bswap64(((const bufhelp_u64_t *)_buf)->a);
#  169|   }
#  170|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def7]
libgcrypt-1.11.2/cipher/bufhelp.h:180:3: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
libgcrypt-1.11.2/cipher/salsa20.c:505:1: enter_function: entry to 'selftest'
libgcrypt-1.11.2/cipher/salsa20.c:528:3: call_function: calling 'salsa20_setkey' from 'selftest'
#  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.2/cipher/bufhelp.h:213:7: warning[-Wanalyzer-null-argument]: use of NULL '_src' where non-null expected
libgcrypt-1.11.2/cipher/cipher-ccm.c:264:1: enter_function: entry to '_gcry_cipher_ccm_tag'
libgcrypt-1.11.2/cipher/cipher-ccm.c:274:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:277:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:7: branch_false: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:6: branch_true: following 'true' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: branch_true: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: call_function: calling 'do_cbc_mac' from '_gcry_cipher_ccm_tag'
#  211|         if (UNLIKELY(len == 0))
#  212|   	return;
#  213|->       memcpy(_dst, _src, len);
#  214|         return;
#  215|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def9]
libgcrypt-1.11.2/cipher/bufhelp.h:213:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '_src'
libgcrypt-1.11.2/cipher/cipher-gcm.c:1209:1: enter_function: entry to '_gcry_cipher_gcm_tag'
libgcrypt-1.11.2/cipher/cipher-gcm.c:1217:6: branch_true: following 'true' branch...
libgcrypt-1.11.2/cipher/cipher-gcm.c:1221:12: branch_true: ...to here
libgcrypt-1.11.2/cipher/cipher-gcm.c:1221:10: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-gcm.c:1225:26: branch_false: ...to here
libgcrypt-1.11.2/cipher/cipher-gcm.c:1234:7: call_function: calling 'do_ghash_buf' from '_gcry_cipher_gcm_tag'
libgcrypt-1.11.2/cipher/cipher-gcm.c:1234:7: return_function: returning to '_gcry_cipher_gcm_tag' from 'do_ghash_buf'
libgcrypt-1.11.2/cipher/cipher-gcm.c:1239:7: call_function: calling 'do_ghash_buf' from '_gcry_cipher_gcm_tag'
#  211|         if (UNLIKELY(len == 0))
#  212|   	return;
#  213|->       memcpy(_dst, _src, len);
#  214|         return;
#  215|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
libgcrypt-1.11.2/cipher/bufhelp.h:236:14: warning[-Wanalyzer-null-dereference]: dereference of NULL 'src'
libgcrypt-1.11.2/cipher/cipher-ccm.c:264:1: enter_function: entry to '_gcry_cipher_ccm_tag'
libgcrypt-1.11.2/cipher/cipher-ccm.c:274:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:277:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:7: branch_false: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:280:6: branch_true: following 'true' branch...
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: branch_true: ...to here
libgcrypt-1.11.2/cipher/cipher-ccm.c:282:14: call_function: calling 'do_cbc_mac' from '_gcry_cipher_ccm_tag'
#  234|     /* Handle tail.  */
#  235|     for (; len; len--)
#  236|->     *dst++ = *src++;
#  237|   }
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
libgcrypt-1.11.2/cipher/des.c:653:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*keys'
libgcrypt-1.11.2/cipher/des.c:1362:1: enter_function: entry to 'selftest_fips'
libgcrypt-1.11.2/cipher/des.c:1370:12: call_function: calling 'selftest' from 'selftest_fips'
#  651|     u32 *keys;
#  652|   
#  653|->   keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys;
#  654|   
#  655|     READ_64BIT_DATA (from, left, right)

Error: CPPCHECK_WARNING (CWE-758): [#def12]
libgcrypt-1.11.2/cipher/mceliece6688128f.c:197: error[shiftTooManyBitsSigned]: Shifting signed 64-bit value by 63 bits is undefined behaviour
#  195|   static crypto_int64 crypto_int64_negative_mask(crypto_int64 crypto_int64_x)
#  196|   {
#  197|->   return crypto_int64_x >> (64-1);
#  198|   }
#  199|   

Error: CPPCHECK_WARNING (CWE-758): [#def13]
libgcrypt-1.11.2/cipher/mceliece6688128f.c:381: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  379|   static crypto_int32 crypto_int32_negative_mask(crypto_int32 crypto_int32_x)
#  380|   {
#  381|->   return crypto_int32_x >> (32-1);
#  382|   }
#  383|   

Error: CPPCHECK_WARNING (CWE-758): [#def14]
libgcrypt-1.11.2/cipher/mceliece6688128f.c:474: error[shiftTooManyBitsSigned]: Shifting signed 64-bit value by 63 bits is undefined behaviour
#  472|   static crypto_uint64_signed crypto_uint64_signed_negative_mask(crypto_uint64_signed crypto_uint64_signed_x)
#  473|   {
#  474|->   return crypto_uint64_signed_x >> (64-1);
#  475|   }
#  476|   

Error: CPPCHECK_WARNING (CWE-758): [#def15]
libgcrypt-1.11.2/cipher/mceliece6688128f.c:644: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  642|   static crypto_uint32_signed crypto_uint32_signed_negative_mask(crypto_uint32_signed crypto_uint32_signed_x)
#  643|   {
#  644|->   return crypto_uint32_signed_x >> (32-1);
#  645|   }
#  646|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
libgcrypt-1.11.2/cipher/md.c:1707:3: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&buf, "w")'
libgcrypt-1.11.2/cipher/md.c:1707:20: acquire_resource: opened here
libgcrypt-1.11.2/cipher/md.c:1707:3: danger: 'fopen(&buf, "w")' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1705|     idx++;
# 1706|     snprintf (buf, DIM(buf)-1, "dbgmd-%05d.%.10s", idx, suffix );
# 1707|->   md->ctx->debug = fopen(buf, "w");
# 1708|     if ( !md->ctx->debug )
# 1709|       log_debug("md debug: can't open %s\n", buf );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libgcrypt-1.11.2/cipher/md.c:1707:3: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&buf, "w")'
libgcrypt-1.11.2/cipher/md.c:1707:20: acquire_memory: allocated here
libgcrypt-1.11.2/cipher/md.c:1707:3: danger: 'fopen(&buf, "w")' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1705|     idx++;
# 1706|     snprintf (buf, DIM(buf)-1, "dbgmd-%05d.%.10s", idx, suffix );
# 1707|->   md->ctx->debug = fopen(buf, "w");
# 1708|     if ( !md->ctx->debug )
# 1709|       log_debug("md debug: can't open %s\n", buf );

Error: CPPCHECK_WARNING (CWE-457): [#def18]
libgcrypt-1.11.2/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: COMPILER_WARNING: [#def19]
libgcrypt-1.11.2/cipher/pubkey.c: scope_hint: In function '_gcry_pk_get_keygrip'
libgcrypt-1.11.2/cipher/pubkey.c:972:7: warning[-Wunused-but-set-variable=]: variable 'idx' set but not used
#  972 |   int idx;
#      |       ^~~
#  970|     const char *s;
#  971|     char *name = NULL;
#  972|->   int idx;
#  973|     const char *elems;
#  974|     gcry_md_hd_t md = NULL;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def20]
libgcrypt-1.11.2/cipher/rfc2268.c:108:53: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*(RFC2268_context *)context.S[j]'
libgcrypt-1.11.2/cipher/rfc2268.c:277:1: enter_function: entry to 'selftest'
libgcrypt-1.11.2/cipher/rfc2268.c:313:3: call_function: calling 'setkey_core' from 'selftest'
libgcrypt-1.11.2/cipher/rfc2268.c:313:3: return_function: returning to 'selftest' from 'setkey_core'
libgcrypt-1.11.2/cipher/rfc2268.c:314:3: call_function: calling 'do_encrypt' from 'selftest'
#  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): [#def21]
libgcrypt-1.11.2/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): [#def22]
libgcrypt-1.11.2/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): [#def23]
libgcrypt-1.11.2/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): [#def24]
libgcrypt-1.11.2/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): [#def25]
libgcrypt-1.11.2/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): [#def26]
libgcrypt-1.11.2/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): [#def27]
libgcrypt-1.11.2/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): [#def28]
libgcrypt-1.11.2/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): [#def29]
libgcrypt-1.11.2/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): [#def30]
libgcrypt-1.11.2/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): [#def31]
libgcrypt-1.11.2/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): [#def32]
libgcrypt-1.11.2/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): [#def33]
libgcrypt-1.11.2/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): [#def34]
libgcrypt-1.11.2/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): [#def35]
libgcrypt-1.11.2/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): [#def36]
libgcrypt-1.11.2/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): [#def37]
libgcrypt-1.11.2/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): [#def38]
libgcrypt-1.11.2/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): [#def39]
libgcrypt-1.11.2/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): [#def40]
libgcrypt-1.11.2/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): [#def41]
libgcrypt-1.11.2/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): [#def42]
libgcrypt-1.11.2/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): [#def43]
libgcrypt-1.11.2/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): [#def44]
libgcrypt-1.11.2/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): [#def45]
libgcrypt-1.11.2/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): [#def46]
libgcrypt-1.11.2/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): [#def47]
libgcrypt-1.11.2/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): [#def48]
libgcrypt-1.11.2/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): [#def49]
libgcrypt-1.11.2/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): [#def50]
libgcrypt-1.11.2/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): [#def51]
libgcrypt-1.11.2/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): [#def52]
libgcrypt-1.11.2/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: [#def53]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:613:31: note[note]: called from here
#  611|     if (ctr_low + 32 <= 256)
#  612|       {
#  613|->       const __m512i add0123 = _mm512_set_epi64(3LL << 56, 0,
#  614|   					       2LL << 56, 0,
#  615|   					       1LL << 56, 0,

Error: COMPILER_WARNING: [#def54]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:617:31: note[note]: called from here
#  615|   					       1LL << 56, 0,
#  616|   					       0LL << 56, 0);
#  617|->       const __m512i add4444 = _mm512_set_epi64(4LL << 56, 0,
#  618|   					       4LL << 56, 0,
#  619|   					       4LL << 56, 0,

Error: COMPILER_WARNING: [#def55]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:621:31: note[note]: called from here
#  619|   					       4LL << 56, 0,
#  620|   					       4LL << 56, 0);
#  621|->       const __m512i add4567 = _mm512_add_epi32(add0123, add4444);
#  622|         const __m512i add8888 = _mm512_add_epi32(add4444, add4444);
#  623|   

Error: COMPILER_WARNING: [#def56]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:622:31: note[note]: called from here
#  620|   					       4LL << 56, 0);
#  621|         const __m512i add4567 = _mm512_add_epi32(add0123, add4444);
#  622|->       const __m512i add8888 = _mm512_add_epi32(add4444, add4444);
#  623|   
#  624|         // Fast path without carry handling.

Error: COMPILER_WARNING: [#def57]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:626:9: note[note]: called from here
#  624|         // Fast path without carry handling.
#  625|         __m512i vctr =
#  626|-> 	_mm512_broadcast_i32x4(_mm_loadu_si128((const void *)ctr));
#  627|   
#  628|         cipher_block_add(ctr, 32, blocksize);

Error: COMPILER_WARNING: [#def58]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:629:16: note[note]: called from here
#  627|   
#  628|         cipher_block_add(ctr, 32, blocksize);
#  629|->       vin[0] = _mm512_add_epi32(vctr, add0123);
#  630|         vin[1] = _mm512_add_epi32(vctr, add4567);
#  631|         vin[2] = _mm512_add_epi32(vin[0], add8888);

Error: COMPILER_WARNING: [#def59]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:630:16: note[note]: called from here
#  628|         cipher_block_add(ctr, 32, blocksize);
#  629|         vin[0] = _mm512_add_epi32(vctr, add0123);
#  630|->       vin[1] = _mm512_add_epi32(vctr, add4567);
#  631|         vin[2] = _mm512_add_epi32(vin[0], add8888);
#  632|         vin[3] = _mm512_add_epi32(vin[1], add8888);

Error: COMPILER_WARNING: [#def60]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:631:16: note[note]: called from here
#  629|         vin[0] = _mm512_add_epi32(vctr, add0123);
#  630|         vin[1] = _mm512_add_epi32(vctr, add4567);
#  631|->       vin[2] = _mm512_add_epi32(vin[0], add8888);
#  632|         vin[3] = _mm512_add_epi32(vin[1], add8888);
#  633|         vin[4] = _mm512_add_epi32(vin[2], add8888);

Error: COMPILER_WARNING: [#def61]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:632:16: note[note]: called from here
#  630|         vin[1] = _mm512_add_epi32(vctr, add4567);
#  631|         vin[2] = _mm512_add_epi32(vin[0], add8888);
#  632|->       vin[3] = _mm512_add_epi32(vin[1], add8888);
#  633|         vin[4] = _mm512_add_epi32(vin[2], add8888);
#  634|         vin[5] = _mm512_add_epi32(vin[3], add8888);

Error: COMPILER_WARNING: [#def62]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:633:16: note[note]: called from here
#  631|         vin[2] = _mm512_add_epi32(vin[0], add8888);
#  632|         vin[3] = _mm512_add_epi32(vin[1], add8888);
#  633|->       vin[4] = _mm512_add_epi32(vin[2], add8888);
#  634|         vin[5] = _mm512_add_epi32(vin[3], add8888);
#  635|         vin[6] = _mm512_add_epi32(vin[4], add8888);

Error: COMPILER_WARNING: [#def63]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:634:16: note[note]: called from here
#  632|         vin[3] = _mm512_add_epi32(vin[1], add8888);
#  633|         vin[4] = _mm512_add_epi32(vin[2], add8888);
#  634|->       vin[5] = _mm512_add_epi32(vin[3], add8888);
#  635|         vin[6] = _mm512_add_epi32(vin[4], add8888);
#  636|         vin[7] = _mm512_add_epi32(vin[5], add8888);

Error: COMPILER_WARNING: [#def64]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:635:16: note[note]: called from here
#  633|         vin[4] = _mm512_add_epi32(vin[2], add8888);
#  634|         vin[5] = _mm512_add_epi32(vin[3], add8888);
#  635|->       vin[6] = _mm512_add_epi32(vin[4], add8888);
#  636|         vin[7] = _mm512_add_epi32(vin[5], add8888);
#  637|       }

Error: COMPILER_WARNING: [#def65]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:636:16: note[note]: called from here
#  634|         vin[5] = _mm512_add_epi32(vin[3], add8888);
#  635|         vin[6] = _mm512_add_epi32(vin[4], add8888);
#  636|->       vin[7] = _mm512_add_epi32(vin[5], add8888);
#  637|       }
#  638|     else

Error: COMPILER_WARNING: [#def66]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:651:16: note[note]: called from here
#  649|         cipher_block_add(blocks[2], 2, blocksize);
#  650|         cipher_block_add(blocks[3], 3, blocksize);
#  651|->       vin[0] = _mm512_loadu_epi32 (blocks);
#  652|         cipher_block_add(blocks[0], 4, blocksize);
#  653|         cipher_block_add(blocks[1], 4, blocksize);

Error: COMPILER_WARNING: [#def67]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:656:16: note[note]: called from here
#  654|         cipher_block_add(blocks[2], 4, blocksize);
#  655|         cipher_block_add(blocks[3], 4, blocksize);
#  656|->       vin[1] = _mm512_loadu_epi32 (blocks);
#  657|         cipher_block_add(blocks[0], 4, blocksize);
#  658|         cipher_block_add(blocks[1], 4, blocksize);

Error: COMPILER_WARNING: [#def68]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:661:16: note[note]: called from here
#  659|         cipher_block_add(blocks[2], 4, blocksize);
#  660|         cipher_block_add(blocks[3], 4, blocksize);
#  661|->       vin[2] = _mm512_loadu_epi32 (blocks);
#  662|         cipher_block_add(blocks[0], 4, blocksize);
#  663|         cipher_block_add(blocks[1], 4, blocksize);

Error: COMPILER_WARNING: [#def69]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:666:16: note[note]: called from here
#  664|         cipher_block_add(blocks[2], 4, blocksize);
#  665|         cipher_block_add(blocks[3], 4, blocksize);
#  666|->       vin[3] = _mm512_loadu_epi32 (blocks);
#  667|         cipher_block_add(blocks[0], 4, blocksize);
#  668|         cipher_block_add(blocks[1], 4, blocksize);

Error: COMPILER_WARNING: [#def70]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:671:16: note[note]: called from here
#  669|         cipher_block_add(blocks[2], 4, blocksize);
#  670|         cipher_block_add(blocks[3], 4, blocksize);
#  671|->       vin[4] = _mm512_loadu_epi32 (blocks);
#  672|         cipher_block_add(blocks[0], 4, blocksize);
#  673|         cipher_block_add(blocks[1], 4, blocksize);

Error: COMPILER_WARNING: [#def71]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:676:16: note[note]: called from here
#  674|         cipher_block_add(blocks[2], 4, blocksize);
#  675|         cipher_block_add(blocks[3], 4, blocksize);
#  676|->       vin[5] = _mm512_loadu_epi32 (blocks);
#  677|         cipher_block_add(blocks[0], 4, blocksize);
#  678|         cipher_block_add(blocks[1], 4, blocksize);

Error: COMPILER_WARNING: [#def72]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:681:16: note[note]: called from here
#  679|         cipher_block_add(blocks[2], 4, blocksize);
#  680|         cipher_block_add(blocks[3], 4, blocksize);
#  681|->       vin[6] = _mm512_loadu_epi32 (blocks);
#  682|         cipher_block_add(blocks[0], 4, blocksize);
#  683|         cipher_block_add(blocks[1], 4, blocksize);

Error: COMPILER_WARNING: [#def73]
libgcrypt-1.11.2/cipher/serpent-avx512-x86.c:686:16: note[note]: called from here
#  684|         cipher_block_add(blocks[2], 4, blocksize);
#  685|         cipher_block_add(blocks[3], 4, blocksize);
#  686|->       vin[7] = _mm512_loadu_epi32 (blocks);
#  687|   
#  688|         wipememory(blocks, sizeof(blocks));

Error: COMPILER_WARNING: [#def74]
libgcrypt-1.11.2/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-465): [#def75]
libgcrypt-1.11.2/mpi/mpi-mul.c:145:8: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.2/mpi/mpi-mul.c:123:19: branch_true: following 'true' branch (when 'v' is non-NULL)...
libgcrypt-1.11.2/mpi/mpi-mul.c:123:19: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpi-mul.c:127:19: branch_true: following 'true' branch (when 'u' is non-NULL)...
libgcrypt-1.11.2/mpi/mpi-mul.c:127:19: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpi-mul.c:145:8: danger: pointer 'w' is checked for NULL here but it was already dereferenced at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  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): [#def76]
libgcrypt-1.11.2/mpi/mpi-mul.c:257:6: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.2/mpi/mpi-mul.c:233:17: branch_true: following 'true' branch (when 'u' is non-NULL)...
libgcrypt-1.11.2/mpi/mpi-mul.c:233:17: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpi-mul.c:237:17: branch_true: following 'true' branch (when 'v' is non-NULL)...
libgcrypt-1.11.2/mpi/mpi-mul.c:237:17: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpi-mul.c:257:6: danger: pointer 'w' is checked for NULL here but it was already dereferenced at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  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-465): [#def77]
libgcrypt-1.11.2/mpi/mpicoder.c:313:15: warning[-Wanalyzer-deref-before-check]: check of 'a' for NULL after already dereferencing it
libgcrypt-1.11.2/mpi/mpicoder.c:313:3: branch_false: following 'false' branch (when 'force_secure == 0')...
libgcrypt-1.11.2/mpi/mpicoder.c:313:15: branch_false: ...to here
libgcrypt-1.11.2/mpi/mpicoder.c:313:15: danger: pointer 'a' is checked for NULL here but it was already dereferenced at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  311|       n2 = n + extraalloc;
#  312|   
#  313|->   retbuffer = (force_secure || mpi_is_secure(a))? xtrymalloc_secure (n2)
#  314|                                                   : xtrymalloc (n2);
#  315|     if (!retbuffer)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def78]
libgcrypt-1.11.2/mpi/mpiutil.c:407:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'w'
libgcrypt-1.11.2/mpi/mpiutil.c:397:1: enter_function: entry to '_gcry_mpi_neg'
libgcrypt-1.11.2/mpi/mpiutil.c:399:6: branch_true: following 'true' branch (when 'w != u')...
libgcrypt-1.11.2/mpi/mpiutil.c:400:5: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:400:5: call_function: calling '_gcry_mpi_set' from '_gcry_mpi_neg'
libgcrypt-1.11.2/mpi/mpiutil.c:400:5: return_function: returning to '_gcry_mpi_neg' from '_gcry_mpi_set'
libgcrypt-1.11.2/mpi/mpiutil.c:407:3: danger: dereference of NULL 'w'
#  405|       }
#  406|   
#  407|->   w->sign = !u->sign;
#  408|   }
#  409|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
libgcrypt-1.11.2/mpi/mpiutil.c:495:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'wp'
libgcrypt-1.11.2/mpi/mpiutil.c:479:1: enter_function: entry to '_gcry_mpi_set'
libgcrypt-1.11.2/mpi/mpiutil.c:485:6: branch_true: following 'true' branch (when 'w' is NULL)...
libgcrypt-1.11.2/mpi/mpiutil.c:486:9: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:486:9: call_function: calling '_gcry_mpi_alloc' from '_gcry_mpi_set'
libgcrypt-1.11.2/mpi/mpiutil.c:486:9: return_function: returning to '_gcry_mpi_set' from '_gcry_mpi_alloc'
libgcrypt-1.11.2/mpi/mpiutil.c:487:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/mpi/mpiutil.c:492:3: branch_false: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:492:3: branch_false: following 'false' branch...
libgcrypt-1.11.2/mpi/mpiutil.c:493:3: branch_false: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:493:3: release_memory: '*w.d' is NULL
libgcrypt-1.11.2/mpi/mpiutil.c:495:3: branch_true: following 'true' branch (when '_i < usize')...
libgcrypt-1.11.2/mpi/mpiutil.c:495:3: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:495:3: danger: dereference of NULL 'wp + (long unsigned int)_i * 8'
#  493|     wp = w->d;
#  494|     up = u->d;
#  495|->   MPN_COPY( wp, up, usize );
#  496|     w->nlimbs = usize;
#  497|     w->flags = u->flags;

Error: GCC_ANALYZER_WARNING (CWE-465): [#def80]
libgcrypt-1.11.2/mpi/mpiutil.c:702:7: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.2/mpi/mpiutil.c:695:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/mpi/mpiutil.c:700:6: branch_false: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:700:6: branch_true: following 'true' branch (when 'level == 0')...
libgcrypt-1.11.2/mpi/mpiutil.c:702:7: branch_true: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:702:7: danger: pointer 'w' is checked for NULL here but it was already dereferenced at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  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): [#def81]
libgcrypt-1.11.2/mpi/mpiutil.c:708:7: warning[-Wanalyzer-deref-before-check]: check of 'w' for NULL after already dereferencing it
libgcrypt-1.11.2/mpi/mpiutil.c:695:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/mpi/mpiutil.c:700:6: branch_false: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:700:6: branch_false: following 'false' branch (when 'level != 0')...
libgcrypt-1.11.2/mpi/mpiutil.c:708:7: branch_false: ...to here
libgcrypt-1.11.2/mpi/mpiutil.c:708:7: danger: pointer 'w' is checked for NULL here but it was already dereferenced at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  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-775): [#def82]
libgcrypt-1.11.2/random/random.c:123:15: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/gcrypt/random.conf", "r")'
libgcrypt-1.11.2/random/random.c:112:8: acquire_resource: opened here
libgcrypt-1.11.2/random/random.c:113:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/random/random.c:113:6: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:120:14: branch_true: following 'true' branch...
libgcrypt-1.11.2/random/random.c:123:15: branch_true: ...to here
libgcrypt-1.11.2/random/random.c:123:15: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/random/random.c:123:15: danger: 'fopen("/etc/gcrypt/random.conf", "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  121|               {
#  122|   #ifdef HAVE_SYSLOG
#  123|->               syslog (LOG_USER|LOG_WARNING,
#  124|                         "Libgcrypt warning: error reading '%s', line %d",
#  125|                         fname, lnr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libgcrypt-1.11.2/random/random.c:123:15: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/etc/gcrypt/random.conf", "r")'
libgcrypt-1.11.2/random/random.c:112:8: acquire_memory: allocated here
libgcrypt-1.11.2/random/random.c:113:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/random/random.c:113:6: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:120:14: branch_true: following 'true' branch...
libgcrypt-1.11.2/random/random.c:123:15: branch_true: ...to here
libgcrypt-1.11.2/random/random.c:123:15: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/random/random.c:123:15: danger: 'fopen("/etc/gcrypt/random.conf", "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  121|               {
#  122|   #ifdef HAVE_SYSLOG
#  123|->               syslog (LOG_USER|LOG_WARNING,
#  124|                         "Libgcrypt warning: error reading '%s', line %d",
#  125|                         fname, lnr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
libgcrypt-1.11.2/random/random.c:132:22: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/gcrypt/random.conf", "r")'
libgcrypt-1.11.2/random/random.c:112:8: acquire_resource: opened here
libgcrypt-1.11.2/random/random.c:113:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/random/random.c:113:6: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:118:10: branch_false: following 'false' branch...
libgcrypt-1.11.2/random/random.c:131:7: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:132:22: branch_true: following 'true' branch...
libgcrypt-1.11.2/random/random.c:132:41: branch_true: ...to here
libgcrypt-1.11.2/random/random.c:135:10: branch_false: following 'false' branch (when 'pend' is NULL)...
libgcrypt-1.11.2/random/random.c:137:19: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:144:10: branch_false: following 'false' branch (when the strings are non-equal)...
libgcrypt-1.11.2/random/random.c:146:17: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:146:15: branch_false: following 'false' branch (when the strings are non-equal)...
libgcrypt-1.11.2/random/random.c:151:11: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:151:11: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/random/random.c:132:22: danger: 'fopen("/etc/gcrypt/random.conf", "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  130|           }
#  131|         lnr++;
#  132|->       for (p=buffer; my_isascii (*p) && isspace (*p); p++)
#  133|           ;
#  134|         pend = strchr (p, '\n');

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libgcrypt-1.11.2/random/random.c:132:22: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/etc/gcrypt/random.conf", "r")'
libgcrypt-1.11.2/random/random.c:112:8: acquire_memory: allocated here
libgcrypt-1.11.2/random/random.c:113:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/random/random.c:113:6: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:118:10: branch_false: following 'false' branch...
libgcrypt-1.11.2/random/random.c:131:7: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:132:22: branch_true: following 'true' branch...
libgcrypt-1.11.2/random/random.c:132:41: branch_true: ...to here
libgcrypt-1.11.2/random/random.c:135:10: branch_false: following 'false' branch (when 'pend' is NULL)...
libgcrypt-1.11.2/random/random.c:137:19: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:144:10: branch_false: following 'false' branch (when the strings are non-equal)...
libgcrypt-1.11.2/random/random.c:146:17: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:146:15: branch_false: following 'false' branch (when the strings are non-equal)...
libgcrypt-1.11.2/random/random.c:151:11: branch_false: ...to here
libgcrypt-1.11.2/random/random.c:151:11: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/random/random.c:132:22: danger: 'fopen("/etc/gcrypt/random.conf", "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  130|           }
#  131|         lnr++;
#  132|->       for (p=buffer; my_isascii (*p) && isspace (*p); p++)
#  133|           ;
#  134|         pend = strchr (p, '\n');

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
libgcrypt-1.11.2/src/fips.c:779:7: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "rb")'
libgcrypt-1.11.2/src/fips.c:883:1: enter_function: entry to 'hmac256_check'
libgcrypt-1.11.2/src/fips.c:896:8: acquire_resource: opened here
libgcrypt-1.11.2/src/fips.c:897:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/fips.c:900:9: branch_false: ...to here
libgcrypt-1.11.2/src/fips.c:900:9: call_function: calling 'get_file_offset' from 'hmac256_check'
#  777|   
#  778|     /* Read the ELF header */
#  779|->   if (fseek (fp, 0, SEEK_SET) != 0)
#  780|       return gpg_error_from_syserror ();
#  781|     if (fread (ehdr_p, sizeof (*ehdr_p), 1, fp) != 1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libgcrypt-1.11.2/src/fips.c:779:7: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "rb")'
libgcrypt-1.11.2/src/fips.c:883:1: enter_function: entry to 'hmac256_check'
libgcrypt-1.11.2/src/fips.c:896:8: acquire_memory: allocated here
libgcrypt-1.11.2/src/fips.c:897:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/fips.c:900:9: branch_false: ...to here
libgcrypt-1.11.2/src/fips.c:900:9: call_function: calling 'get_file_offset' from 'hmac256_check'
#  777|   
#  778|     /* Read the ELF header */
#  779|->   if (fseek (fp, 0, SEEK_SET) != 0)
#  780|       return gpg_error_from_syserror ();
#  781|     if (fread (ehdr_p, sizeof (*ehdr_p), 1, fp) != 1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
libgcrypt-1.11.2/src/fips.c:785:7: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "rb")'
libgcrypt-1.11.2/src/fips.c:883:1: enter_function: entry to 'hmac256_check'
libgcrypt-1.11.2/src/fips.c:896:8: acquire_resource: opened here
libgcrypt-1.11.2/src/fips.c:897:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/fips.c:900:9: branch_false: ...to here
libgcrypt-1.11.2/src/fips.c:900:9: call_function: calling 'get_file_offset' from 'hmac256_check'
#  783|   
#  784|     /* The program header entry size should match the size of the phdr struct */
#  785|->   if (ehdr_p->e_phentsize != sizeof (phdr))
#  786|       return gpg_error (GPG_ERR_INV_OBJ);
#  787|     if (ehdr_p->e_phoff == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
libgcrypt-1.11.2/src/fips.c:785:7: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "rb")'
libgcrypt-1.11.2/src/fips.c:883:1: enter_function: entry to 'hmac256_check'
libgcrypt-1.11.2/src/fips.c:896:8: acquire_memory: allocated here
libgcrypt-1.11.2/src/fips.c:897:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/fips.c:900:9: branch_false: ...to here
libgcrypt-1.11.2/src/fips.c:900:9: call_function: calling 'get_file_offset' from 'hmac256_check'
#  783|   
#  784|     /* The program header entry size should match the size of the phdr struct */
#  785|->   if (ehdr_p->e_phentsize != sizeof (phdr))
#  786|       return gpg_error (GPG_ERR_INV_OBJ);
#  787|     if (ehdr_p->e_phoff == 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
libgcrypt-1.11.2/src/hwfeatures.c:194:15: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/gcrypt/hwf.deny", "r")'
libgcrypt-1.11.2/src/hwfeatures.c:183:8: acquire_resource: opened here
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:191:14: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:194:15: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:194:15: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/src/hwfeatures.c:194:15: danger: 'fopen("/etc/gcrypt/hwf.deny", "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  192|               {
#  193|   #ifdef HAVE_SYSLOG
#  194|->               syslog (LOG_USER|LOG_WARNING,
#  195|                         "Libgcrypt warning: error reading '%s', line %d",
#  196|                         fname, lnr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
libgcrypt-1.11.2/src/hwfeatures.c:194:15: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/etc/gcrypt/hwf.deny", "r")'
libgcrypt-1.11.2/src/hwfeatures.c:183:8: acquire_memory: allocated here
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:191:14: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:194:15: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:194:15: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/src/hwfeatures.c:194:15: danger: 'fopen("/etc/gcrypt/hwf.deny", "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  192|               {
#  193|   #ifdef HAVE_SYSLOG
#  194|->               syslog (LOG_USER|LOG_WARNING,
#  195|                         "Libgcrypt warning: error reading '%s', line %d",
#  196|                         fname, lnr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
libgcrypt-1.11.2/src/hwfeatures.c:203:22: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/gcrypt/hwf.deny", "r")'
libgcrypt-1.11.2/src/hwfeatures.c:183:8: acquire_resource: opened here
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:189:10: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:202:7: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:203:22: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:203:41: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:206:10: branch_false: following 'false' branch (when 'pend' is NULL)...
libgcrypt-1.11.2/src/hwfeatures.c:208:19: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:215:10: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:215:10: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:189:10: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:191:16: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:191:14: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:194:15: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:194:15: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/src/hwfeatures.c:203:22: danger: 'fopen("/etc/gcrypt/hwf.deny", "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  201|           }
#  202|         lnr++;
#  203|->       for (p=buffer; my_isascii (*p) && isspace (*p); p++)
#  204|           ;
#  205|         pend = strchr (p, '\n');

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
libgcrypt-1.11.2/src/hwfeatures.c:203:22: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/etc/gcrypt/hwf.deny", "r")'
libgcrypt-1.11.2/src/hwfeatures.c:183:8: acquire_memory: allocated here
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:184:6: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:189:10: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:202:7: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:203:22: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:203:41: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:206:10: branch_false: following 'false' branch (when 'pend' is NULL)...
libgcrypt-1.11.2/src/hwfeatures.c:208:19: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:215:10: branch_false: following 'false' branch...
libgcrypt-1.11.2/src/hwfeatures.c:215:10: branch_false: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:189:10: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:191:16: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:191:14: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/hwfeatures.c:194:15: branch_true: ...to here
libgcrypt-1.11.2/src/hwfeatures.c:194:15: throw: if 'syslog' throws an exception...
libgcrypt-1.11.2/src/hwfeatures.c:203:22: danger: 'fopen("/etc/gcrypt/hwf.deny", "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  201|           }
#  202|         lnr++;
#  203|->       for (p=buffer; my_isascii (*p) && isspace (*p); p++)
#  204|           ;
#  205|         pend = strchr (p, '\n');

Error: GCC_ANALYZER_WARNING (CWE-404): [#def94]
libgcrypt-1.11.2/src/misc.c:169:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/misc.c:410:1: enter_function: entry to '_gcry_log_printsxp'
libgcrypt-1.11.2/src/misc.c:414:6: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/misc.c:416:10: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/misc.c:417:9: branch_true: ...to here
libgcrypt-1.11.2/src/misc.c:417:9: call_function: calling '_gcry_log_debug' from '_gcry_log_printsxp'
#  167|       {
#  168|         /* The deprecated log handler has been registered.  */
#  169|->       log_handler (log_handler_value, level, fmt, arg_ptr);
#  170|         if (level == GCRY_LOG_FATAL || level == GCRY_LOG_BUG)
#  171|           {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def95]
libgcrypt-1.11.2/src/misc.c:180:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/misc.c:410:1: enter_function: entry to '_gcry_log_printsxp'
libgcrypt-1.11.2/src/misc.c:414:6: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/misc.c:416:10: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/misc.c:417:9: branch_true: ...to here
libgcrypt-1.11.2/src/misc.c:417:9: call_function: calling '_gcry_log_debug' from '_gcry_log_printsxp'
#  178|     else
#  179|       {
#  180|->       gpgrt_logv_domain ("gcrypt", map_log_level (level), NULL, NULL, 0,
#  181|                            fmt, arg_ptr);
#  182|       }

Error: COMPILER_WARNING (CWE-704): [#def96]
libgcrypt-1.11.2/src/misc.c: scope_hint: In function '_gcry_log_printsxp'
libgcrypt-1.11.2/src/misc.c:439:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  439 |           pend = strchr (p, '\n');
#      |                ^
#  437|             else
#  438|               any = 1;
#  439|->           pend = strchr (p, '\n');
#  440|             size = pend? (pend - p) : strlen (p);
#  441|             if (with_lf)

Error: COMPILER_WARNING (CWE-704): [#def97]
libgcrypt-1.11.2/src/misc.c:439:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  437|             else
#  438|               any = 1;
#  439|->           pend = strchr (p, '\n');
#  440|             size = pend? (pend - p) : strlen (p);
#  441|             if (with_lf)

Error: CPPCHECK_WARNING (CWE-457): [#def98]
libgcrypt-1.11.2/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): [#def99]
libgcrypt-1.11.2/src/secmem.c:187:70: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mb_prev'
libgcrypt-1.11.2/src/secmem.c:754:1: enter_function: entry to '_gcry_secmem_realloc_internal'
libgcrypt-1.11.2/src/secmem.c:763:6: branch_false: following 'false' branch (when 'size <= newsize')...
libgcrypt-1.11.2/src/secmem.c:770:11: branch_false: ...to here
libgcrypt-1.11.2/src/secmem.c:770:11: call_function: calling '_gcry_secmem_malloc_internal' from '_gcry_secmem_realloc_internal'
#  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): [#def100]
libgcrypt-1.11.2/src/secmem.c:246:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mb'
libgcrypt-1.11.2/src/secmem.c:754:1: enter_function: entry to '_gcry_secmem_realloc_internal'
libgcrypt-1.11.2/src/secmem.c:763:6: branch_false: following 'false' branch (when 'size <= newsize')...
libgcrypt-1.11.2/src/secmem.c:770:11: branch_false: ...to here
libgcrypt-1.11.2/src/secmem.c:770:11: call_function: calling '_gcry_secmem_malloc_internal' from '_gcry_secmem_realloc_internal'
#  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: GCC_ANALYZER_WARNING (CWE-401): [#def101]
libgcrypt-1.11.2/src/secmem.c:271:7: warning[-Wanalyzer-malloc-leak]: leak of 'pool'
libgcrypt-1.11.2/src/secmem.c:754:1: enter_function: entry to '_gcry_secmem_realloc_internal'
libgcrypt-1.11.2/src/secmem.c:763:6: branch_false: following 'false' branch (when 'size <= newsize')...
libgcrypt-1.11.2/src/secmem.c:770:11: branch_false: ...to here
libgcrypt-1.11.2/src/secmem.c:770:11: call_function: calling '_gcry_secmem_malloc_internal' from '_gcry_secmem_realloc_internal'
#  269|     if (! ptr_into_pool_p (pool, mb))
#  270|       {
#  271|->       gpg_err_set_errno (ENOMEM);
#  272|         mb = NULL;
#  273|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
libgcrypt-1.11.2/src/secmem.c:283:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libgcrypt-1.11.2/src/secmem.c:754:1: enter_function: entry to '_gcry_secmem_realloc_internal'
libgcrypt-1.11.2/src/secmem.c:763:6: branch_false: following 'false' branch (when 'size <= newsize')...
libgcrypt-1.11.2/src/secmem.c:770:11: branch_false: ...to here
libgcrypt-1.11.2/src/secmem.c:770:11: call_function: calling '_gcry_secmem_malloc_internal' from '_gcry_secmem_realloc_internal'
#  281|   {
#  282|     if (!no_warning)
#  283|->     log_info (_("Warning: using insecure memory!\n"));
#  284|   }
#  285|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
libgcrypt-1.11.2/src/secmem.c:283:5: warning[-Wanalyzer-malloc-leak]: leak of 'pool'
libgcrypt-1.11.2/src/secmem.c:754:1: enter_function: entry to '_gcry_secmem_realloc_internal'
libgcrypt-1.11.2/src/secmem.c:763:6: branch_false: following 'false' branch (when 'size <= newsize')...
libgcrypt-1.11.2/src/secmem.c:770:11: branch_false: ...to here
libgcrypt-1.11.2/src/secmem.c:770:11: call_function: calling '_gcry_secmem_malloc_internal' from '_gcry_secmem_realloc_internal'
#  281|   {
#  282|     if (!no_warning)
#  283|->     log_info (_("Warning: using insecure memory!\n"));
#  284|   }
#  285|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
libgcrypt-1.11.2/src/secmem.c:677:18: warning[-Wanalyzer-malloc-leak]: leak of 'pool'
libgcrypt-1.11.2/src/secmem.c:754:1: enter_function: entry to '_gcry_secmem_realloc_internal'
libgcrypt-1.11.2/src/secmem.c:763:6: branch_false: following 'false' branch (when 'size <= newsize')...
libgcrypt-1.11.2/src/secmem.c:770:11: branch_false: ...to here
libgcrypt-1.11.2/src/secmem.c:770:11: call_function: calling '_gcry_secmem_malloc_internal' from '_gcry_secmem_realloc_internal'
#  675|           {
#  676|             stats_update (pool, mb->size, 0);
#  677|->           return &mb->aligned.c;
#  678|           }
#  679|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def105]
libgcrypt-1.11.2/src/secmem.c:894:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mb'
libgcrypt-1.11.2/src/secmem.c:879:38: branch_true: following 'true' branch (when 'pool' is non-NULL)...
libgcrypt-1.11.2/src/secmem.c:881:10: branch_true: ...to here
libgcrypt-1.11.2/src/secmem.c:894:13: danger: dereference of NULL 'mb'
#  892|                  ptr_into_pool_p (pool, mb);
#  893|                  mb = mb_get_next (pool, mb), i++)
#  894|->             log_info ("SECMEM: pool %d %s block %i size %i\n",
#  895|                         poolno,
#  896|                         (mb->flags & MB_FLAG_ACTIVE) ? "used" : "free",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def106]
libgcrypt-1.11.2/src/sexp.c:482:23: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:2716:1: enter_function: entry to '_gcry_sexp_extract_param'
libgcrypt-1.11.2/src/sexp.c:2722:3: acquire_resource: 'va_start' called here
libgcrypt-1.11.2/src/sexp.c:2723:8: call_function: calling '_gcry_sexp_vextract_param' from '_gcry_sexp_extract_param'
#  480|                     else if ( *p == ST_STOP )
#  481|                       {
#  482|->                       BUG ();
#  483|   		    }
#  484|   		}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def107]
libgcrypt-1.11.2/src/sexp.c:487:25: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:2716:1: enter_function: entry to '_gcry_sexp_extract_param'
libgcrypt-1.11.2/src/sexp.c:2722:3: acquire_resource: 'va_start' called here
libgcrypt-1.11.2/src/sexp.c:2723:8: call_function: calling '_gcry_sexp_vextract_param' from '_gcry_sexp_extract_param'
#  485|                 n = p - head;
#  486|   
#  487|->               newlist = xtrymalloc ( sizeof *newlist + n );
#  488|                 if (!newlist)
#  489|                   {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def108]
libgcrypt-1.11.2/src/sexp.c:989:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:264:1: enter_function: entry to '_gcry_sexp_create'
libgcrypt-1.11.2/src/sexp.c:288:13: call_function: calling 'do_sexp_sscan' from '_gcry_sexp_create'
#  987|         if (newsize <= c->allocated)
#  988|           return GPG_ERR_TOO_LARGE;
#  989|->       newsexp = xtryrealloc ( c->sexp, sizeof *newsexp + newsize - 1);
#  990|         if (!newsexp)
#  991|           return gpg_err_code_from_errno (errno);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def109]
libgcrypt-1.11.2/src/sexp.c:991:16: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:264:1: enter_function: entry to '_gcry_sexp_create'
libgcrypt-1.11.2/src/sexp.c:288:13: call_function: calling 'do_sexp_sscan' from '_gcry_sexp_create'
#  989|         newsexp = xtryrealloc ( c->sexp, sizeof *newsexp + newsize - 1);
#  990|         if (!newsexp)
#  991|->         return gpg_err_code_from_errno (errno);
#  992|         c->allocated = newsize;
#  993|         newhead = newsexp->d;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def110]
libgcrypt-1.11.2/src/sexp.c:1177:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:1860:1: enter_function: entry to '_gcry_sexp_sscan'
libgcrypt-1.11.2/src/sexp.c:1863:10: call_function: calling 'do_sexp_sscan' from '_gcry_sexp_sscan'
# 1175|     c.allocated = length + sizeof(DATALEN);
# 1176|     if (length && _gcry_is_secure (buffer))
# 1177|->     c.sexp = xtrymalloc_secure (sizeof *c.sexp + c.allocated - 1);
# 1178|     else
# 1179|       c.sexp = xtrymalloc (sizeof *c.sexp + c.allocated - 1);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def111]
libgcrypt-1.11.2/src/sexp.c:1179:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:1860:1: enter_function: entry to '_gcry_sexp_sscan'
libgcrypt-1.11.2/src/sexp.c:1863:10: call_function: calling 'do_sexp_sscan' from '_gcry_sexp_sscan'
# 1177|       c.sexp = xtrymalloc_secure (sizeof *c.sexp + c.allocated - 1);
# 1178|     else
# 1179|->     c.sexp = xtrymalloc (sizeof *c.sexp + c.allocated - 1);
# 1180|     if (!c.sexp)
# 1181|       {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def112]
libgcrypt-1.11.2/src/sexp.c:1182:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:1860:1: enter_function: entry to '_gcry_sexp_sscan'
libgcrypt-1.11.2/src/sexp.c:1863:10: call_function: calling 'do_sexp_sscan' from '_gcry_sexp_sscan'
# 1180|     if (!c.sexp)
# 1181|       {
# 1182|->       err = gpg_err_code_from_errno (errno);
# 1183|         *erroff = 0;
# 1184|         goto leave;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def113]
libgcrypt-1.11.2/src/sexp.c:1346:24: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/sexp.c:264:1: enter_function: entry to '_gcry_sexp_create'
libgcrypt-1.11.2/src/sexp.c:288:13: call_function: calling 'do_sexp_sscan' from '_gcry_sexp_create'
# 1344|   
# 1345|                 base64++;         /* Skip beginning '|' */
# 1346|->               b64buf = xtrymalloc (b64count);
# 1347|                 if (!b64buf)
# 1348|                   {

Error: GCC_ANALYZER_WARNING (CWE-126): [#def114]
libgcrypt-1.11.2/src/sexp.c:1881:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libgcrypt-1.11.2/src/sexp.c:1996:1: enter_function: entry to '_gcry_sexp_sprint'
libgcrypt-1.11.2/src/sexp.c:2007:7: branch_false: following 'false' branch (when 'list' is NULL)...
libgcrypt-1.11.2/src/sexp.c:2009:9: branch_false: ...to here
libgcrypt-1.11.2/src/sexp.c:2009:11: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/sexp.c:2011:7: branch_true: ...to here
libgcrypt-1.11.2/src/sexp.c:2064:14: branch_true: following 'true' branch (when 'mode == 3')...
libgcrypt-1.11.2/src/sexp.c:2069:30: branch_true: ...to here
libgcrypt-1.11.2/src/sexp.c:2069:30: call_function: calling 'suitable_encoding' from '_gcry_sexp_sprint'
# 1879|       return 1;
# 1880|   
# 1881|->   if (*buffer & 0x80)
# 1882|       return 0; /* If the MSB is set we assume that buffer represents a
# 1883|                    negative number.  */

Error: GCC_ANALYZER_WARNING (CWE-126): [#def115]
libgcrypt-1.11.2/src/sexp.c:1887:12: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libgcrypt-1.11.2/src/sexp.c:1996:1: enter_function: entry to '_gcry_sexp_sprint'
libgcrypt-1.11.2/src/sexp.c:2007:7: branch_false: following 'false' branch (when 'list' is NULL)...
libgcrypt-1.11.2/src/sexp.c:2009:9: branch_false: ...to here
libgcrypt-1.11.2/src/sexp.c:2009:11: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/sexp.c:2011:7: branch_true: ...to here
libgcrypt-1.11.2/src/sexp.c:2064:14: branch_true: following 'true' branch (when 'mode == 3')...
libgcrypt-1.11.2/src/sexp.c:2069:30: branch_true: ...to here
libgcrypt-1.11.2/src/sexp.c:2069:30: call_function: calling 'suitable_encoding' from '_gcry_sexp_sprint'
# 1885|     for (s=buffer; length; s++, length--)
# 1886|       {
# 1887|->       if (!*s)
# 1888|           return 0; /*binary*/
# 1889|         if ( (*s < 0x20 || (*s >= 0x7f && *s <= 0xa0))

Error: GCC_ANALYZER_WARNING (CWE-126): [#def116]
libgcrypt-1.11.2/src/sexp.c:1912:36: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libgcrypt-1.11.2/src/sexp.c:1996:1: enter_function: entry to '_gcry_sexp_sprint'
libgcrypt-1.11.2/src/sexp.c:2007:7: branch_false: following 'false' branch (when 'list' is NULL)...
libgcrypt-1.11.2/src/sexp.c:2009:9: branch_false: ...to here
libgcrypt-1.11.2/src/sexp.c:2009:11: branch_true: following 'true' branch...
libgcrypt-1.11.2/src/sexp.c:2011:7: branch_true: ...to here
libgcrypt-1.11.2/src/sexp.c:2064:14: branch_true: following 'true' branch (when 'mode == 3')...
libgcrypt-1.11.2/src/sexp.c:2069:30: branch_true: ...to here
libgcrypt-1.11.2/src/sexp.c:2076:18: branch_true: following 'true' branch (when 'buffer' is non-NULL)...
libgcrypt-1.11.2/src/sexp.c:2078:22: branch_true: ...to here
libgcrypt-1.11.2/src/sexp.c:2078:22: branch_false: following 'false' branch (when 'maxlength > len')...
libgcrypt-1.11.2/src/sexp.c:2080:19: branch_false: ...to here
libgcrypt-1.11.2/src/sexp.c:2084:30: call_function: calling 'convert_to_hex' from '_gcry_sexp_sprint'
# 1910|         *dest++ = '#';
# 1911|         for (i=0; i < len; i++, dest += 2 )
# 1912|->         snprintf (dest, 3, "%02X", src[i]);
# 1913|         *dest++ = '#';
# 1914|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def117]
libgcrypt-1.11.2/src/visibility.c:80:20: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/visibility.c:79:3: acquire_resource: 'va_start' called here
libgcrypt-1.11.2/src/visibility.c:80:20: throw: if '_gcry_vcontrol' throws an exception...
libgcrypt-1.11.2/src/visibility.c:80:20: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   78|   
#   79|     va_start (arg_ptr, cmd);
#   80|->   err = gpg_error (_gcry_vcontrol (cmd, arg_ptr));
#   81|     va_end(arg_ptr);
#   82|     return err;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def118]
libgcrypt-1.11.2/src/visibility.c:117:8: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/visibility.c:116:3: acquire_resource: 'va_start' called here
libgcrypt-1.11.2/src/visibility.c:117:8: throw: if '_gcry_sexp_vbuild' throws an exception...
libgcrypt-1.11.2/src/visibility.c:117:8: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  115|   
#  116|     va_start (arg_ptr, format);
#  117|->   rc = _gcry_sexp_vbuild (retsexp, erroff, format, arg_ptr);
#  118|     va_end (arg_ptr);
#  119|     return gpg_error (rc);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def119]
libgcrypt-1.11.2/src/visibility.c:262:8: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/visibility.c:261:3: acquire_resource: 'va_start' called here
libgcrypt-1.11.2/src/visibility.c:262:8: throw: if '_gcry_sexp_vextract_param' throws an exception...
libgcrypt-1.11.2/src/visibility.c:262:8: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  260|   
#  261|     va_start (arg_ptr, list);
#  262|->   rc = _gcry_sexp_vextract_param (sexp, path, list, arg_ptr);
#  263|     va_end (arg_ptr);
#  264|     return gpg_error (rc);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def120]
libgcrypt-1.11.2/src/visibility.c:1639:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgcrypt-1.11.2/src/visibility.c:1638:3: acquire_resource: 'va_start' called here
libgcrypt-1.11.2/src/visibility.c:1639:3: throw: if '_gcry_logv' throws an exception...
libgcrypt-1.11.2/src/visibility.c:1639:3: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1637|   
# 1638|     va_start( arg_ptr, fmt ) ;
# 1639|->   _gcry_logv (GCRY_LOG_DEBUG, fmt, arg_ptr);
# 1640|     va_end (arg_ptr);
# 1641|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
libgcrypt-1.11.2/tests/basic.c:16025:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16025:9: throw: if ‘gcry_mac_setkey’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16025:9: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#16023|   
#16024|     clutter_vector_registers();
#16025|->   err = gcry_mac_setkey (hd, key, keylen);
#16026|     if (err)
#16027|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
libgcrypt-1.11.2/tests/basic.c:16036:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16028:11: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16028:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16036:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16036:9: throw: if ‘gpg_strerror’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16036:9: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#16034|           }
#16035|         else
#16036|->         fail("algo %d, mac gcry_mac_setkey failed: %s\n", algo, gpg_strerror (err));
#16037|         goto out;
#16038|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
libgcrypt-1.11.2/tests/basic.c:16043:13: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16040:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16043:13: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16043:13: throw: if ‘gcry_mac_setiv’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16043:13: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#16041|       {
#16042|         clutter_vector_registers();
#16043|->       err = gcry_mac_setiv (hd, iv, ivlen);
#16044|         if (err)
#16045|           fail("algo %d, mac gcry_mac_ivkey failed: %s\n", algo,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
libgcrypt-1.11.2/tests/basic.c:16045:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16040:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16043:13: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16044:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16045:9: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16045:9: throw: if ‘gpg_strerror’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16045:9: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#16043|         err = gcry_mac_setiv (hd, iv, ivlen);
#16044|         if (err)
#16045|->         fail("algo %d, mac gcry_mac_ivkey failed: %s\n", algo,
#16046|                gpg_strerror (err));
#16047|         if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
libgcrypt-1.11.2/tests/basic.c:16056:17: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16051:6: branch_true: following ‘true’ branch (when ‘test_buffering != 0’)...
libgcrypt-1.11.2/tests/basic.c:16051:6: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16053:19: branch_true: following ‘true’ branch (when ‘i < datalen’)...
libgcrypt-1.11.2/tests/basic.c:16056:17: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16056:17: throw: if ‘gcry_mac_write’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16056:17: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#16054|           {
#16055|   	  clutter_vector_registers();
#16056|->           err = gcry_mac_write (hd, &data[i], 1);
#16057|             if (err)
#16058|               fail("algo %d, mac gcry_mac_write [buf-offset: %d] failed: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
libgcrypt-1.11.2/tests/basic.c:16058:13: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16051:6: branch_true: following ‘true’ branch (when ‘test_buffering != 0’)...
libgcrypt-1.11.2/tests/basic.c:16051:6: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16053:19: branch_true: following ‘true’ branch (when ‘i < datalen’)...
libgcrypt-1.11.2/tests/basic.c:16056:17: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16058:13: throw: if ‘gpg_strerror’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16058:13: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#16056|             err = gcry_mac_write (hd, &data[i], 1);
#16057|             if (err)
#16058|->             fail("algo %d, mac gcry_mac_write [buf-offset: %d] failed: %s\n",
#16059|                    algo, i, gpg_strerror (err));
#16060|             if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
libgcrypt-1.11.2/tests/basic.c:16090:15: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16051:6: branch_false: following ‘false’ branch (when ‘test_buffering == 0’)...
libgcrypt-1.11.2/tests/basic.c:16066:12: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16066:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16078:23: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16080:15: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16086:18: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16090:15: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16090:15: throw: if ‘gcry_mac_write’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16090:15: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#16088|   
#16089|   	      clutter_vector_registers();
#16090|->               gcry_mac_write (hd, aaa, piecelen);
#16091|   
#16092|                 left -= piecelen;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
libgcrypt-1.11.2/tests/basic.c:16120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16051:6: branch_false: following ‘false’ branch (when ‘test_buffering == 0’)...
libgcrypt-1.11.2/tests/basic.c:16066:12: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16120:17: throw: if ‘gcry_mac_write’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16120:17: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#16118|           {
#16119|   	  clutter_vector_registers();
#16120|->           err = gcry_mac_write (hd, data, datalen);
#16121|           }
#16122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
libgcrypt-1.11.2/tests/basic.c:16124:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16051:6: branch_false: following ‘false’ branch (when ‘test_buffering == 0’)...
libgcrypt-1.11.2/tests/basic.c:16066:12: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16123:10: branch_true: following ‘true’ branch (when ‘err != 0’)...
libgcrypt-1.11.2/tests/basic.c:16124:9: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16124:9: throw: if ‘gpg_strerror’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16124:9: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#16122|   
#16123|         if (err)
#16124|->         fail("algo %d, mac gcry_mac_write failed: %s\n", algo, gpg_strerror (err));
#16125|         if (err)
#16126|           goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
libgcrypt-1.11.2/tests/basic.c:16130:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16130:9: throw: if ‘gcry_mac_verify’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16130:9: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#16128|   
#16129|     clutter_vector_registers();
#16130|->   err = gcry_mac_verify (hd, expect, maclen);
#16131|     if (err)
#16132|       fail("algo %d, mac gcry_mac_verify failed: %s\n", algo, gpg_strerror (err));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
libgcrypt-1.11.2/tests/basic.c:16132:5: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16131:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16132:5: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16132:5: throw: if ‘gpg_strerror’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16132:5: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#16130|     err = gcry_mac_verify (hd, expect, maclen);
#16131|     if (err)
#16132|->     fail("algo %d, mac gcry_mac_verify failed: %s\n", algo, gpg_strerror (err));
#16133|   
#16134|     macoutlen = maclen;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
libgcrypt-1.11.2/tests/basic.c:16136:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16040:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16136:9: throw: if ‘gcry_mac_read’ throws an exception...
libgcrypt-1.11.2/tests/basic.c:16136:9: danger: ‘p’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#16134|     macoutlen = maclen;
#16135|     clutter_vector_registers();
#16136|->   err = gcry_mac_read (hd, p, &macoutlen);
#16137|     if (err)
#16138|       fail("algo %d, mac gcry_mac_read failed: %s\n", algo, gpg_strerror (err));

Error: CPPCHECK_WARNING (CWE-457): [#def133]
libgcrypt-1.11.2/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): [#def134]
libgcrypt-1.11.2/tests/fipsdrv.c:300:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname,  <unknown>)’
libgcrypt-1.11.2/tests/fipsdrv.c:1659:1: enter_function: entry to ‘run_rsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:1672:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1674:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1706:6: branch_false: following ‘false’ branch (when ‘err == 0’)...
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: call_function: calling ‘read_public_key_file’ from ‘run_rsa_verify’
#  298|         bufsize += NCHUNK;
#  299|         if (!buffer)
#  300|->         buffer = gcry_xmalloc (bufsize);
#  301|         else
#  302|           buffer = gcry_xrealloc (buffer, bufsize);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
libgcrypt-1.11.2/tests/fipsdrv.c:300:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "rb")’
libgcrypt-1.11.2/tests/fipsdrv.c:2198:1: enter_function: entry to ‘run_ecdsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:2207:11: call_function: calling ‘read_sexp_from_file’ from ‘run_ecdsa_verify’
#  298|         bufsize += NCHUNK;
#  299|         if (!buffer)
#  300|->         buffer = gcry_xmalloc (bufsize);
#  301|         else
#  302|           buffer = gcry_xrealloc (buffer, bufsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
libgcrypt-1.11.2/tests/fipsdrv.c:300:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname,  <unknown>)’
libgcrypt-1.11.2/tests/fipsdrv.c:1659:1: enter_function: entry to ‘run_rsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:1672:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1674:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1706:6: branch_false: following ‘false’ branch (when ‘err == 0’)...
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: call_function: calling ‘read_public_key_file’ from ‘run_rsa_verify’
#  298|         bufsize += NCHUNK;
#  299|         if (!buffer)
#  300|->         buffer = gcry_xmalloc (bufsize);
#  301|         else
#  302|           buffer = gcry_xrealloc (buffer, bufsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
libgcrypt-1.11.2/tests/fipsdrv.c:300:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "rb")’
libgcrypt-1.11.2/tests/fipsdrv.c:2198:1: enter_function: entry to ‘run_ecdsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:2207:11: call_function: calling ‘read_sexp_from_file’ from ‘run_ecdsa_verify’
#  298|         bufsize += NCHUNK;
#  299|         if (!buffer)
#  300|->         buffer = gcry_xmalloc (bufsize);
#  301|         else
#  302|           buffer = gcry_xrealloc (buffer, bufsize);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
libgcrypt-1.11.2/tests/fipsdrv.c:304:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname,  <unknown>)’
libgcrypt-1.11.2/tests/fipsdrv.c:1659:1: enter_function: entry to ‘run_rsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:1672:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1674:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1706:6: branch_false: following ‘false’ branch (when ‘err == 0’)...
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: call_function: calling ‘read_public_key_file’ from ‘run_rsa_verify’
#  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): [#def139]
libgcrypt-1.11.2/tests/fipsdrv.c:304:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "rb")’
libgcrypt-1.11.2/tests/fipsdrv.c:2198:1: enter_function: entry to ‘run_ecdsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:2207:11: call_function: calling ‘read_sexp_from_file’ from ‘run_ecdsa_verify’
#  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): [#def140]
libgcrypt-1.11.2/tests/fipsdrv.c:304:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname,  <unknown>)’
libgcrypt-1.11.2/tests/fipsdrv.c:1659:1: enter_function: entry to ‘run_rsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:1672:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1674:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1706:6: branch_false: following ‘false’ branch (when ‘err == 0’)...
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1710:11: call_function: calling ‘read_public_key_file’ from ‘run_rsa_verify’
#  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): [#def141]
libgcrypt-1.11.2/tests/fipsdrv.c:304:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "rb")’
libgcrypt-1.11.2/tests/fipsdrv.c:2198:1: enter_function: entry to ‘run_ecdsa_verify’
libgcrypt-1.11.2/tests/fipsdrv.c:2207:11: call_function: calling ‘read_sexp_from_file’ from ‘run_ecdsa_verify’
#  302|           buffer = gcry_xrealloc (buffer, bufsize);
#  303|   
#  304|->       nread = fread (buffer + buflen, 1, NCHUNK, fp);
#  305|         if (nread < NCHUNK && ferror (fp))
#  306|           {

Error: CPPCHECK_WARNING (CWE-457): [#def142]
libgcrypt-1.11.2/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-457): [#def143]
libgcrypt-1.11.2/tests/fipsdrv.c:828:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*p’
libgcrypt-1.11.2/tests/fipsdrv.c:1099:1: enter_function: entry to ‘run_cipher_mct_loop’
libgcrypt-1.11.2/tests/fipsdrv.c:1116:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1120:14: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1121:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1125:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1128:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1132:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1140:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1143:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1145:17: branch_false: following ‘false’ branch (when ‘count >= iterations’)...
libgcrypt-1.11.2/tests/fipsdrv.c:1177:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1177:3: call_function: calling ‘print_buffer’ from ‘run_cipher_mct_loop’
libgcrypt-1.11.2/tests/fipsdrv.c:1177:3: return_function: returning to ‘run_cipher_mct_loop’ from ‘print_buffer’
libgcrypt-1.11.2/tests/fipsdrv.c:1179:3: call_function: calling ‘print_buffer’ from ‘run_cipher_mct_loop’
#  826|           showhex ("sent line", buffer, length);
#  827|         while (length-- && !ferror (stdout) )
#  828|->         printf ("%02X", *p++);
#  829|         if (ferror (stdout))
#  830|           writerr++;

Error: CPPCHECK_WARNING (CWE-457): [#def144]
libgcrypt-1.11.2/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: GCC_ANALYZER_WARNING (CWE-457): [#def145]
libgcrypt-1.11.2/tests/fipsdrv.c:1147:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(__int128 unsigned *)(&last_output[0])’
libgcrypt-1.11.2/tests/fipsdrv.c:1116:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1120:14: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1121:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1125:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1128:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1132:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1140:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:1143:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1145:17: branch_true: following ‘true’ branch (when ‘count < iterations’)...
libgcrypt-1.11.2/tests/fipsdrv.c:1147:7: branch_true: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:1147:7: danger: use of uninitialized value ‘*(__int128 unsigned *)(&last_output[0])’ here
# 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): [#def146]
libgcrypt-1.11.2/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): [#def147]
libgcrypt-1.11.2/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): [#def148]
libgcrypt-1.11.2/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): [#def149]
libgcrypt-1.11.2/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): [#def150]
libgcrypt-1.11.2/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): [#def151]
libgcrypt-1.11.2/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): [#def152]
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: danger: ‘input’ leaks here; was opened at [(7)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/6)
# 2477|       fprintf (stderr, PGM ": started (mode=%s)\n", mode_string);
# 2478|   
# 2479|->   xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
# 2480|     if (!no_fips)
# 2481|       xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: danger: ‘input’ leaks here; was allocated at [(7)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/6)
# 2477|       fprintf (stderr, PGM ": started (mode=%s)\n", mode_string);
# 2478|   
# 2479|->   xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
# 2480|     if (!no_fips)
# 2481|       xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_true: following ‘true’ branch (when ‘no_fips == 0’)...
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: branch_true: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: danger: ‘input’ leaks here; was opened at [(7)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/6)
# 2479|     xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
# 2480|     if (!no_fips)
# 2481|->     xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
# 2482|     if (!gcry_check_version ("1.4.3"))
# 2483|       die ("Libgcrypt is not sufficient enough\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_true: following ‘true’ branch (when ‘no_fips == 0’)...
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: branch_true: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: danger: ‘input’ leaks here; was allocated at [(7)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/6)
# 2479|     xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
# 2480|     if (!no_fips)
# 2481|->     xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
# 2482|     if (!gcry_check_version ("1.4.3"))
# 2483|       die ("Libgcrypt is not sufficient enough\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: throw: if ‘gcry_check_version’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: danger: ‘input’ leaks here; was opened at [(7)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/6)
# 2480|     if (!no_fips)
# 2481|       xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
# 2482|->   if (!gcry_check_version ("1.4.3"))
# 2483|       die ("Libgcrypt is not sufficient enough\n");
# 2484|     if (verbose)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: throw: if ‘gcry_check_version’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: danger: ‘input’ leaks here; was allocated at [(7)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/6)
# 2480|     if (!no_fips)
# 2481|       xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
# 2482|->   if (!gcry_check_version ("1.4.3"))
# 2483|       die ("Libgcrypt is not sufficient enough\n");
# 2484|     if (verbose)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
libgcrypt-1.11.2/tests/fipsdrv.c:2488:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2482:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2484:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2488:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2488:3: danger: ‘input’ leaks here; was opened at [(7)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/6)
# 2486|     if (no_fips)
# 2487|       xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
# 2488|->   xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
# 2489|   
# 2490|     /* Most operations need some input data.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
libgcrypt-1.11.2/tests/fipsdrv.c:2488:3: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2480:6: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2481:5: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2482:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2482:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2484:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2488:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/fipsdrv.c:2488:3: danger: ‘input’ leaks here; was allocated at [(7)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/6)
# 2486|     if (no_fips)
# 2487|       xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
# 2488|->   xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
# 2489|   
# 2490|     /* Most operations need some input data.  */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def160]
libgcrypt-1.11.2/tests/hashtest.c:395:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libgcrypt-1.11.2/tests/hashtest.c:551:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/hashtest.c:561:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/hashtest.c:564:12: branch_true: ...to here
libgcrypt-1.11.2/tests/hashtest.c:564:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
libgcrypt-1.11.2/tests/hashtest.c:569:17: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:569:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
libgcrypt-1.11.2/tests/hashtest.c:582:17: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:587:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
libgcrypt-1.11.2/tests/hashtest.c:593:17: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:593:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
libgcrypt-1.11.2/tests/hashtest.c:598:17: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:598:15: branch_true: following ‘true’ branch (when the strings are equal)...
libgcrypt-1.11.2/tests/hashtest.c:600:11: branch_true: ...to here
libgcrypt-1.11.2/tests/hashtest.c:601:14: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/hashtest.c:603:22: branch_true: ...to here
libgcrypt-1.11.2/tests/hashtest.c:626:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/hashtest.c:629:3: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:629:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/hashtest.c:630:8: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:630:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/hashtest.c:632:7: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:632:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/hashtest.c:634:3: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:634:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/hashtest.c:635:3: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:635:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/hashtest.c:635:3: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:644:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/hashtest.c:648:3: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:649:6: branch_true: following ‘true’ branch (when ‘argc == 0’)...
libgcrypt-1.11.2/tests/hashtest.c:649:6: branch_true: ...to here
libgcrypt-1.11.2/tests/hashtest.c:651:20: branch_true: following ‘true’ branch (when ‘algo != 400’)...
libgcrypt-1.11.2/tests/hashtest.c:652:14: branch_true: ...to here
libgcrypt-1.11.2/tests/hashtest.c:652:12: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/hashtest.c:654:16: branch_true: ...to here
libgcrypt-1.11.2/tests/hashtest.c:654:16: branch_false: following ‘false’ branch (when ‘gigs != 0’)...
libgcrypt-1.11.2/tests/hashtest.c:657:15: branch_false: ...to here
libgcrypt-1.11.2/tests/hashtest.c:657:15: call_function: calling ‘run_longtest’ from ‘main’
#  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): [#def161]
libgcrypt-1.11.2/tests/keygen.c:89: error[uninitvar]: Uninitialized variable: buf
#   87|     else
#   88|       {
#   89|->       fprintf (stderr, "%s\n", buf);
#   90|         gcry_free (buf);
#   91|       }

Error: CPPCHECK_WARNING (CWE-457): [#def162]
libgcrypt-1.11.2/tests/pubkey.c:385: warning[uninitvar]: Uninitialized variable: sec_key
#  383|   
#  384|     *pkey = pub_key;
#  385|->   *skey = sec_key;
#  386|   }
#  387|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
libgcrypt-1.11.2/tests/random.c:94:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[0]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#   92|     while (nleft > 0)
#   93|       {
#   94|->       nwritten = write (fd, buf, nleft);
#   95|         if (nwritten < 0)
#   96|           {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
libgcrypt-1.11.2/tests/random.c:94:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[1]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#   92|     while (nleft > 0)
#   93|       {
#   94|->       nwritten = write (fd, buf, nleft);
#   95|         if (nwritten < 0)
#   96|           {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
libgcrypt-1.11.2/tests/random.c:170:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[0]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#  168|     if (!pid)
#  169|       {
#  170|->       gcry_randomize (tmp1c, sizeof tmp1c, GCRY_STRONG_RANDOM);
#  171|         if (writen (rp[1], tmp1c, sizeof tmp1c))
#  172|           die ("write failed: %s\n", strerror (errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
libgcrypt-1.11.2/tests/random.c:170:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[1]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#  168|     if (!pid)
#  169|       {
#  170|->       gcry_randomize (tmp1c, sizeof tmp1c, GCRY_STRONG_RANDOM);
#  171|         if (writen (rp[1], tmp1c, sizeof tmp1c))
#  172|           die ("write failed: %s\n", strerror (errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def167]
libgcrypt-1.11.2/tests/random.c:180:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[0]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#  178|         _exit (0);
#  179|       }
#  180|->   gcry_randomize (tmp1p, sizeof tmp1p, GCRY_STRONG_RANDOM);
#  181|     if (verbose)
#  182|       print_hex (" parent random: ", tmp1p, sizeof tmp1p);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def168]
libgcrypt-1.11.2/tests/random.c:180:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[1]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#  178|         _exit (0);
#  179|       }
#  180|->   gcry_randomize (tmp1p, sizeof tmp1p, GCRY_STRONG_RANDOM);
#  181|     if (verbose)
#  182|       print_hex (" parent random: ", tmp1p, sizeof tmp1p);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def169]
libgcrypt-1.11.2/tests/random.c:184:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[0]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#  182|       print_hex (" parent random: ", tmp1p, sizeof tmp1p);
#  183|   
#  184|->   close (rp[1]);
#  185|     if (readn (rp[0], tmp1c, sizeof tmp1c, &nread))
#  186|       die ("read failed: %s\n", strerror (errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
libgcrypt-1.11.2/tests/random.c:184:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[1]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#  182|       print_hex (" parent random: ", tmp1p, sizeof tmp1p);
#  183|   
#  184|->   close (rp[1]);
#  185|     if (readn (rp[0], tmp1c, sizeof tmp1c, &nread))
#  186|       die ("read failed: %s\n", strerror (errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
libgcrypt-1.11.2/tests/random.c:615:11: warning[-Wanalyzer-malloc-leak]: leak of ‘cmdline’
libgcrypt-1.11.2/tests/random.c:597:13: acquire_memory: allocated here
libgcrypt-1.11.2/tests/random.c:598:6: branch_false: following ‘false’ branch (when ‘cmdline’ is non-NULL)...
libgcrypt-1.11.2/tests/random.c:598:6: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:601:15: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/random.c:603:11: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:615:11: throw: if ‘system’ throws an exception...
libgcrypt-1.11.2/tests/random.c:615:11: danger: ‘cmdline’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  613|         strcat (cmdline, " ");
#  614|         strcat (cmdline, options[idx]);
#  615|->       if (system (cmdline))
#  616|           die ("running '%s' failed\n", cmdline);
#  617|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
libgcrypt-1.11.2/tests/rsacvt.c:364:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: danger: ‘input’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  362|       input = stdin;
#  363|   
#  364|->   xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
#  365|     if (!gcry_check_version ("1.4.0"))
#  366|       die ("Libgcrypt is not sufficient enough\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
libgcrypt-1.11.2/tests/rsacvt.c:364:3: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: danger: ‘input’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  362|       input = stdin;
#  363|   
#  364|->   xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
#  365|     if (!gcry_check_version ("1.4.0"))
#  366|       die ("Libgcrypt is not sufficient enough\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
libgcrypt-1.11.2/tests/rsacvt.c:365:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:365:8: throw: if ‘gcry_check_version’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: danger: ‘input’ leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  363|   
#  364|     xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
#  365|->   if (!gcry_check_version ("1.4.0"))
#  366|       die ("Libgcrypt is not sufficient enough\n");
#  367|     xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
libgcrypt-1.11.2/tests/rsacvt.c:365:8: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:365:8: throw: if ‘gcry_check_version’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: danger: ‘input’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  363|   
#  364|     xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
#  365|->   if (!gcry_check_version ("1.4.0"))
#  366|       die ("Libgcrypt is not sufficient enough\n");
#  367|     xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
libgcrypt-1.11.2/tests/rsacvt.c:367:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:365:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:367:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:367:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:367:3: danger: ‘input’ leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  365|     if (!gcry_check_version ("1.4.0"))
#  366|       die ("Libgcrypt is not sufficient enough\n");
#  367|->   xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
#  368|     xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
#  369|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
libgcrypt-1.11.2/tests/rsacvt.c:367:3: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:365:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:367:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:367:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:367:3: danger: ‘input’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  365|     if (!gcry_check_version ("1.4.0"))
#  366|       die ("Libgcrypt is not sufficient enough\n");
#  367|->   xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
#  368|     xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
#  369|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
libgcrypt-1.11.2/tests/rsacvt.c:368:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:365:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:367:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:367:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:368:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:368:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:368:3: danger: ‘input’ leaks here; was opened at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  366|       die ("Libgcrypt is not sufficient enough\n");
#  367|     xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
#  368|->   xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
#  369|   
#  370|     do

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
libgcrypt-1.11.2/tests/rsacvt.c:368:3: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/rsacvt.c:348:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
libgcrypt-1.11.2/tests/rsacvt.c:352:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:355:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:357:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/rsacvt.c:358:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:364:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:365:8: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:365:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:367:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:367:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/rsacvt.c:368:3: branch_false: ...to here
libgcrypt-1.11.2/tests/rsacvt.c:368:3: throw: if ‘gcry_control’ throws an exception...
libgcrypt-1.11.2/tests/rsacvt.c:368:3: danger: ‘input’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  366|       die ("Libgcrypt is not sufficient enough\n");
#  367|     xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
#  368|->   xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
#  369|   
#  370|     do

Error: GCC_ANALYZER_WARNING (CWE-775): [#def180]
libgcrypt-1.11.2/tests/t-common.h:82:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[0]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#   80|     (void) debug;
#   81|   
#   82|->   fflush (stdout);
#   83|   #ifdef HAVE_FLOCKFILE
#   84|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def181]
libgcrypt-1.11.2/tests/t-common.h:82:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rp[1]’
libgcrypt-1.11.2/tests/random.c:653:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/random.c:662:6: branch_true: following ‘true’ branch (when ‘argc != 0’)...
libgcrypt-1.11.2/tests/random.c:664:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:764:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:765:8: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:765:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:768:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:781:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/random.c:782:7: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:785:6: branch_false: following ‘false’ branch (when ‘benchmark == 0’)...
libgcrypt-1.11.2/tests/random.c:789:11: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:789:11: branch_true: following ‘true’ branch (when ‘in_recursion == 0’)...
libgcrypt-1.11.2/tests/random.c:791:7: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:791:7: call_function: calling ‘check_forking’ from ‘main’
#   80|     (void) debug;
#   81|   
#   82|->   fflush (stdout);
#   83|   #ifdef HAVE_FLOCKFILE
#   84|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
libgcrypt-1.11.2/tests/t-common.h:82:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2296:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_resource: opened here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_true: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: call_function: calling ‘die’ from ‘main’
#   80|     (void) debug;
#   81|   
#   82|->   fflush (stdout);
#   83|   #ifdef HAVE_FLOCKFILE
#   84|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
libgcrypt-1.11.2/tests/t-common.h:82:3: warning[-Wanalyzer-malloc-leak]: leak of ‘cmdline’
libgcrypt-1.11.2/tests/random.c:571:1: enter_function: entry to ‘run_all_rng_tests’
libgcrypt-1.11.2/tests/random.c:597:13: acquire_memory: allocated here
libgcrypt-1.11.2/tests/random.c:598:6: branch_false: following ‘false’ branch (when ‘cmdline’ is non-NULL)...
libgcrypt-1.11.2/tests/random.c:598:6: branch_false: ...to here
libgcrypt-1.11.2/tests/random.c:601:15: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/random.c:603:11: branch_true: ...to here
libgcrypt-1.11.2/tests/random.c:616:9: call_function: calling ‘die’ from ‘run_all_rng_tests’
#   80|     (void) debug;
#   81|   
#   82|->   fflush (stdout);
#   83|   #ifdef HAVE_FLOCKFILE
#   84|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
libgcrypt-1.11.2/tests/t-common.h:82:3: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
libgcrypt-1.11.2/tests/fipsdrv.c:2296:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/fipsdrv.c:2451:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2454:3: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2456:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2459:8: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2462:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2464:15: acquire_memory: allocated here
libgcrypt-1.11.2/tests/fipsdrv.c:2465:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2472:7: branch_false: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: branch_true: ...to here
libgcrypt-1.11.2/tests/fipsdrv.c:2479:3: call_function: calling ‘die’ from ‘main’
#   80|     (void) debug;
#   81|   
#   82|->   fflush (stdout);
#   83|   #ifdef HAVE_FLOCKFILE
#   84|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
libgcrypt-1.11.2/tests/t-common.h:82:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15977:1: enter_function: entry to ‘check_one_mac’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16028:11: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16028:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16036:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16036:9: call_function: calling ‘fail’ from ‘check_one_mac’
#   80|     (void) debug;
#   81|   
#   82|->   fflush (stdout);
#   83|   #ifdef HAVE_FLOCKFILE
#   84|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
libgcrypt-1.11.2/tests/t-common.h:106:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libgcrypt-1.11.2/tests/basic.c:15977:1: enter_function: entry to ‘check_one_mac’
libgcrypt-1.11.2/tests/basic.c:15998:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16004:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16011:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16017:7: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16017:7: acquire_memory: allocated here
libgcrypt-1.11.2/tests/basic.c:16018:6: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libgcrypt-1.11.2/tests/basic.c:16025:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16026:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/basic.c:16028:11: branch_true: ...to here
libgcrypt-1.11.2/tests/basic.c:16028:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/basic.c:16036:9: branch_false: ...to here
libgcrypt-1.11.2/tests/basic.c:16036:9: call_function: calling ‘fail’ from ‘check_one_mac’
#  104|     va_list arg_ptr;
#  105|   
#  106|->   fflush (stdout);
#  107|   #ifdef HAVE_FLOCKFILE
#  108|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def187]
libgcrypt-1.11.2/tests/t-common.h:272:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-mlkem.c:141:1: enter_function: entry to ‘check_mlkem_kat’
libgcrypt-1.11.2/tests/t-mlkem.c:151:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-mlkem.c:152:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:156:30: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:158:18: call_function: calling ‘read_textline’ from ‘check_mlkem_kat’
#  270|             if (feof (fp))
#  271|               return NULL;
#  272|->           die ("error reading input line: %s\n", strerror (errno));
#  273|           }
#  274|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
libgcrypt-1.11.2/tests/t-common.h:272:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-mlkem.c:141:1: enter_function: entry to ‘check_mlkem_kat’
libgcrypt-1.11.2/tests/t-mlkem.c:151:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-mlkem.c:152:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:156:30: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:158:18: call_function: calling ‘read_textline’ from ‘check_mlkem_kat’
#  270|             if (feof (fp))
#  271|               return NULL;
#  272|->           die ("error reading input line: %s\n", strerror (errno));
#  273|           }
#  274|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def189]
libgcrypt-1.11.2/tests/t-common.h:274:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-mlkem.c:141:1: enter_function: entry to ‘check_mlkem_kat’
libgcrypt-1.11.2/tests/t-mlkem.c:151:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-mlkem.c:152:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:156:30: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:158:18: call_function: calling ‘read_textline’ from ‘check_mlkem_kat’
libgcrypt-1.11.2/tests/t-mlkem.c:158:18: return_function: returning to ‘check_mlkem_kat’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-mlkem.c:158:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:160:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:160:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:162:17: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:162:15: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:163:9: branch_true: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:163:9: call_function: calling ‘copy_data’ from ‘check_mlkem_kat’
#  272|             die ("error reading input line: %s\n", strerror (errno));
#  273|           }
#  274|->       ++*lineno;
#  275|         p = strchr (line, '\n');
#  276|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
libgcrypt-1.11.2/tests/t-common.h:274:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-mlkem.c:141:1: enter_function: entry to ‘check_mlkem_kat’
libgcrypt-1.11.2/tests/t-mlkem.c:151:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-mlkem.c:152:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:156:30: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:158:18: call_function: calling ‘read_textline’ from ‘check_mlkem_kat’
libgcrypt-1.11.2/tests/t-mlkem.c:158:18: return_function: returning to ‘check_mlkem_kat’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-mlkem.c:158:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:160:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:160:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:162:17: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:162:15: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:163:9: branch_true: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:163:9: call_function: calling ‘copy_data’ from ‘check_mlkem_kat’
#  272|             die ("error reading input line: %s\n", strerror (errno));
#  273|           }
#  274|->       ++*lineno;
#  275|         p = strchr (line, '\n');
#  276|         if (!p)

Error: CPPCHECK_WARNING (CWE-457): [#def191]
libgcrypt-1.11.2/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): [#def192]
libgcrypt-1.11.2/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: GCC_ANALYZER_WARNING (CWE-775): [#def193]
libgcrypt-1.11.2/tests/t-dsa.c:91:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-dsa.c:466:1: enter_function: entry to ‘check_dsa’
libgcrypt-1.11.2/tests/t-dsa.c:477:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-dsa.c:478:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:481:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:485:18: call_function: calling ‘read_textline’ from ‘check_dsa’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
libgcrypt-1.11.2/tests/t-dsa.c:91:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-dsa.c:466:1: enter_function: entry to ‘check_dsa’
libgcrypt-1.11.2/tests/t-dsa.c:477:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-dsa.c:478:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:481:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:485:18: call_function: calling ‘read_textline’ from ‘check_dsa’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def195]
libgcrypt-1.11.2/tests/t-dsa.c:93:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-dsa.c:466:1: enter_function: entry to ‘check_dsa’
libgcrypt-1.11.2/tests/t-dsa.c:477:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-dsa.c:478:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:481:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:485:18: call_function: calling ‘read_textline’ from ‘check_dsa’
libgcrypt-1.11.2/tests/t-dsa.c:485:18: return_function: returning to ‘check_dsa’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-dsa.c:485:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:487:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:487:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:488:9: branch_true: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:488:9: call_function: calling ‘parse_annotation’ from ‘check_dsa’
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
libgcrypt-1.11.2/tests/t-dsa.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-dsa.c:466:1: enter_function: entry to ‘check_dsa’
libgcrypt-1.11.2/tests/t-dsa.c:477:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-dsa.c:478:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:481:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:485:18: call_function: calling ‘read_textline’ from ‘check_dsa’
libgcrypt-1.11.2/tests/t-dsa.c:485:18: return_function: returning to ‘check_dsa’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-dsa.c:485:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:487:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:487:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:488:9: branch_true: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:488:9: call_function: calling ‘parse_annotation’ from ‘check_dsa’
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def197]
libgcrypt-1.11.2/tests/t-dsa.c:526:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-dsa.c:547:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-dsa.c:605:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-dsa.c:606:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:606:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-dsa.c:606:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-dsa.c:610:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:611:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:611:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:613:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:615:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:616:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:616:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:618:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:622:3: call_function: calling ‘check_dsa’ from ‘main’
#  524|   
#  525|       }
#  526|->   xfree (p);
#  527|     xfree (q);
#  528|     xfree (g);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
libgcrypt-1.11.2/tests/t-dsa.c:526:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-dsa.c:547:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-dsa.c:605:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-dsa.c:606:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:606:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-dsa.c:606:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-dsa.c:610:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:611:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:611:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:613:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:615:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:616:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:616:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-dsa.c:618:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-dsa.c:622:3: call_function: calling ‘check_dsa’ from ‘main’
#  524|   
#  525|       }
#  526|->   xfree (p);
#  527|     xfree (q);
#  528|     xfree (g);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def199]
libgcrypt-1.11.2/tests/t-ecdsa.c:91:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ecdsa.c:516:1: enter_function: entry to ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:528:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-ecdsa.c:529:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:532:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: call_function: calling ‘read_textline’ from ‘check_ecdsa’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
libgcrypt-1.11.2/tests/t-ecdsa.c:91:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ecdsa.c:516:1: enter_function: entry to ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:528:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-ecdsa.c:529:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:532:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: call_function: calling ‘read_textline’ from ‘check_ecdsa’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def201]
libgcrypt-1.11.2/tests/t-ecdsa.c:93:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ecdsa.c:516:1: enter_function: entry to ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:528:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-ecdsa.c:529:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:532:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: call_function: calling ‘read_textline’ from ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: return_function: returning to ‘check_ecdsa’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:539:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:539:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:540:9: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:540:9: call_function: calling ‘parse_annotation’ from ‘check_ecdsa’
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
libgcrypt-1.11.2/tests/t-ecdsa.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ecdsa.c:516:1: enter_function: entry to ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:528:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-ecdsa.c:529:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:532:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: call_function: calling ‘read_textline’ from ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: return_function: returning to ‘check_ecdsa’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:539:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:539:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:540:9: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:540:9: call_function: calling ‘parse_annotation’ from ‘check_ecdsa’
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def203]
libgcrypt-1.11.2/tests/t-ecdsa.c:575:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ecdsa.c:516:1: enter_function: entry to ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:528:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-ecdsa.c:529:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:532:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: call_function: calling ‘read_textline’ from ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: return_function: returning to ‘check_ecdsa’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:575:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:585:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:586:5: call_function: calling ‘fail’ from ‘check_ecdsa’
#  573|   
#  574|       }
#  575|->   xfree (curve);
#  576|     xfree (sha_alg);
#  577|     xfree (x);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
libgcrypt-1.11.2/tests/t-ecdsa.c:575:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ecdsa.c:516:1: enter_function: entry to ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:528:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-ecdsa.c:529:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:532:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: call_function: calling ‘read_textline’ from ‘check_ecdsa’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:18: return_function: returning to ‘check_ecdsa’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ecdsa.c:537:10: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:575:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ecdsa.c:585:6: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ecdsa.c:586:5: call_function: calling ‘fail’ from ‘check_ecdsa’
#  573|   
#  574|       }
#  575|->   xfree (curve);
#  576|     xfree (sha_alg);
#  577|     xfree (x);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def205]
libgcrypt-1.11.2/tests/t-ed25519.c:110:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed25519.c:350:1: enter_function: entry to ‘check_ed25519’
libgcrypt-1.11.2/tests/t-ed25519.c:360:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-ed25519.c:361:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:365:19: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:367:18: call_function: calling ‘read_textline’ from ‘check_ed25519’
#  108|             if (feof (fp))
#  109|               return NULL;
#  110|->           die ("error reading input line: %s\n", strerror (errno));
#  111|           }
#  112|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
libgcrypt-1.11.2/tests/t-ed25519.c:110:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed25519.c:350:1: enter_function: entry to ‘check_ed25519’
libgcrypt-1.11.2/tests/t-ed25519.c:360:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-ed25519.c:361:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:365:19: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:367:18: call_function: calling ‘read_textline’ from ‘check_ed25519’
#  108|             if (feof (fp))
#  109|               return NULL;
#  110|->           die ("error reading input line: %s\n", strerror (errno));
#  111|           }
#  112|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def207]
libgcrypt-1.11.2/tests/t-ed25519.c:112:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed25519.c:350:1: enter_function: entry to ‘check_ed25519’
libgcrypt-1.11.2/tests/t-ed25519.c:360:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-ed25519.c:361:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:365:19: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:367:18: call_function: calling ‘read_textline’ from ‘check_ed25519’
libgcrypt-1.11.2/tests/t-ed25519.c:367:18: return_function: returning to ‘check_ed25519’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ed25519.c:367:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:369:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:369:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:370:24: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:382:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-ed25519.c:112:9: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  110|             die ("error reading input line: %s\n", strerror (errno));
#  111|           }
#  112|->       ++*lineno;
#  113|         p = strchr (line, '\n');
#  114|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
libgcrypt-1.11.2/tests/t-ed25519.c:112:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed25519.c:350:1: enter_function: entry to ‘check_ed25519’
libgcrypt-1.11.2/tests/t-ed25519.c:360:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-ed25519.c:361:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:365:19: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:367:18: call_function: calling ‘read_textline’ from ‘check_ed25519’
libgcrypt-1.11.2/tests/t-ed25519.c:367:18: return_function: returning to ‘check_ed25519’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ed25519.c:367:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:369:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:369:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:370:24: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:382:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-ed25519.c:112:9: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#  110|             die ("error reading input line: %s\n", strerror (errno));
#  111|           }
#  112|->       ++*lineno;
#  113|         p = strchr (line, '\n');
#  114|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def209]
libgcrypt-1.11.2/tests/t-ed25519.c:397:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed25519.c:412:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-ed25519.c:481:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-ed25519.c:482:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:482:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-ed25519.c:482:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-ed25519.c:486:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:487:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:487:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:489:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:496:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:497:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:497:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:499:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:500:3: call_function: calling ‘check_ed25519’ from ‘main’
#  395|   
#  396|       }
#  397|->   xfree (pk);
#  398|     xfree (sk);
#  399|     xfree (msg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
libgcrypt-1.11.2/tests/t-ed25519.c:397:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed25519.c:412:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-ed25519.c:481:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-ed25519.c:482:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:482:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-ed25519.c:482:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-ed25519.c:486:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:487:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:487:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:489:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:496:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:497:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:497:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed25519.c:499:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed25519.c:500:3: call_function: calling ‘check_ed25519’ from ‘main’
#  395|   
#  396|       }
#  397|->   xfree (pk);
#  398|     xfree (sk);
#  399|     xfree (msg);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def211]
libgcrypt-1.11.2/tests/t-ed448.c:109:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed448.c:372:1: enter_function: entry to ‘check_ed448’
libgcrypt-1.11.2/tests/t-ed448.c:383:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-ed448.c:384:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:389:25: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:391:18: call_function: calling ‘read_textline’ from ‘check_ed448’
#  107|             if (feof (fp))
#  108|               return NULL;
#  109|->           die ("error reading input line: %s\n", strerror (errno));
#  110|           }
#  111|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
libgcrypt-1.11.2/tests/t-ed448.c:109:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed448.c:372:1: enter_function: entry to ‘check_ed448’
libgcrypt-1.11.2/tests/t-ed448.c:383:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-ed448.c:384:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:389:25: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:391:18: call_function: calling ‘read_textline’ from ‘check_ed448’
#  107|             if (feof (fp))
#  108|               return NULL;
#  109|->           die ("error reading input line: %s\n", strerror (errno));
#  110|           }
#  111|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def213]
libgcrypt-1.11.2/tests/t-ed448.c:111:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed448.c:372:1: enter_function: entry to ‘check_ed448’
libgcrypt-1.11.2/tests/t-ed448.c:383:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-ed448.c:384:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:389:25: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:391:18: call_function: calling ‘read_textline’ from ‘check_ed448’
libgcrypt-1.11.2/tests/t-ed448.c:391:18: return_function: returning to ‘check_ed448’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ed448.c:391:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:393:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:393:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:394:24: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:410:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-ed448.c:111:9: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  109|             die ("error reading input line: %s\n", strerror (errno));
#  110|           }
#  111|->       ++*lineno;
#  112|         p = strchr (line, '\n');
#  113|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
libgcrypt-1.11.2/tests/t-ed448.c:111:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed448.c:372:1: enter_function: entry to ‘check_ed448’
libgcrypt-1.11.2/tests/t-ed448.c:383:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-ed448.c:384:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:389:25: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:391:18: call_function: calling ‘read_textline’ from ‘check_ed448’
libgcrypt-1.11.2/tests/t-ed448.c:391:18: return_function: returning to ‘check_ed448’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-ed448.c:391:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:393:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:393:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:394:24: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:410:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-ed448.c:111:9: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#  109|             die ("error reading input line: %s\n", strerror (errno));
#  110|           }
#  111|->       ++*lineno;
#  112|         p = strchr (line, '\n');
#  113|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def215]
libgcrypt-1.11.2/tests/t-ed448.c:427:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed448.c:443:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-ed448.c:507:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-ed448.c:508:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:508:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-ed448.c:508:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-ed448.c:512:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:513:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:513:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:515:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:517:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:518:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:518:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:520:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:521:3: call_function: calling ‘check_ed448’ from ‘main’
#  425|   
#  426|       }
#  427|->   xfree (pk);
#  428|     xfree (sk);
#  429|     xfree (msg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
libgcrypt-1.11.2/tests/t-ed448.c:427:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-ed448.c:443:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-ed448.c:507:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-ed448.c:508:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:508:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-ed448.c:508:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-ed448.c:512:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:513:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:513:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:515:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:517:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:518:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:518:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-ed448.c:520:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-ed448.c:521:3: call_function: calling ‘check_ed448’ from ‘main’
#  425|   
#  426|       }
#  427|->   xfree (pk);
#  428|     xfree (sk);
#  429|     xfree (msg);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def217]
libgcrypt-1.11.2/tests/t-mlkem.c:191:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-mlkem.c:205:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-mlkem.c:278:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-mlkem.c:279:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:279:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-mlkem.c:279:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-mlkem.c:283:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:284:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:284:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:286:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:288:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:289:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:289:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:291:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:292:3: call_function: calling ‘check_mlkem_kat’ from ‘main’
#  189|           }
#  190|       }
#  191|->   xfree (pk_str);
#  192|     xfree (sk_str);
#  193|     xfree (ct_str);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
libgcrypt-1.11.2/tests/t-mlkem.c:191:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-mlkem.c:205:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-mlkem.c:278:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-mlkem.c:279:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:279:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-mlkem.c:279:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-mlkem.c:283:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:284:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:284:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:286:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:288:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:289:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:289:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-mlkem.c:291:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-mlkem.c:292:3: call_function: calling ‘check_mlkem_kat’ from ‘main’
#  189|           }
#  190|       }
#  191|->   xfree (pk_str);
#  192|     xfree (sk_str);
#  193|     xfree (ct_str);

Error: CPPCHECK_WARNING (CWE-457): [#def219]
libgcrypt-1.11.2/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: GCC_ANALYZER_WARNING (CWE-775): [#def220]
libgcrypt-1.11.2/tests/t-rsa-15.c:91:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-15.c:331:1: enter_function: entry to ‘check_rsa_15’
libgcrypt-1.11.2/tests/t-rsa-15.c:341:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-rsa-15.c:342:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:345:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:348:18: call_function: calling ‘read_textline’ from ‘check_rsa_15’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
libgcrypt-1.11.2/tests/t-rsa-15.c:91:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-15.c:331:1: enter_function: entry to ‘check_rsa_15’
libgcrypt-1.11.2/tests/t-rsa-15.c:341:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-rsa-15.c:342:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:345:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:348:18: call_function: calling ‘read_textline’ from ‘check_rsa_15’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def222]
libgcrypt-1.11.2/tests/t-rsa-15.c:93:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-15.c:331:1: enter_function: entry to ‘check_rsa_15’
libgcrypt-1.11.2/tests/t-rsa-15.c:341:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-rsa-15.c:342:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:345:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:348:18: call_function: calling ‘read_textline’ from ‘check_rsa_15’
libgcrypt-1.11.2/tests/t-rsa-15.c:348:18: return_function: returning to ‘check_rsa_15’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-rsa-15.c:348:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:350:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:350:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:368:7: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:368:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-rsa-15.c:93:9: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
libgcrypt-1.11.2/tests/t-rsa-15.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-15.c:331:1: enter_function: entry to ‘check_rsa_15’
libgcrypt-1.11.2/tests/t-rsa-15.c:341:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-rsa-15.c:342:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:345:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:348:18: call_function: calling ‘read_textline’ from ‘check_rsa_15’
libgcrypt-1.11.2/tests/t-rsa-15.c:348:18: return_function: returning to ‘check_rsa_15’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-rsa-15.c:348:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:350:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:350:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:368:7: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:368:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-rsa-15.c:93:9: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def224]
libgcrypt-1.11.2/tests/t-rsa-15.c:381:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-15.c:398:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-rsa-15.c:456:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-rsa-15.c:457:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:457:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-rsa-15.c:457:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-rsa-15.c:461:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:462:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:462:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:464:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:466:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:467:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:467:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:469:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:473:3: call_function: calling ‘check_rsa_15’ from ‘main’
#  379|   
#  380|       }
#  381|->   xfree (n);
#  382|     xfree (e);
#  383|     xfree (d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
libgcrypt-1.11.2/tests/t-rsa-15.c:381:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-15.c:398:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-rsa-15.c:456:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-rsa-15.c:457:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:457:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-rsa-15.c:457:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-rsa-15.c:461:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:462:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:462:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:464:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:466:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:467:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:467:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-15.c:469:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-15.c:473:3: call_function: calling ‘check_rsa_15’ from ‘main’
#  379|   
#  380|       }
#  381|->   xfree (n);
#  382|     xfree (e);
#  383|     xfree (d);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def226]
libgcrypt-1.11.2/tests/t-rsa-pss.c:91:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-pss.c:374:1: enter_function: entry to ‘check_rsa_pss’
libgcrypt-1.11.2/tests/t-rsa-pss.c:384:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-rsa-pss.c:385:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:388:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:18: call_function: calling ‘read_textline’ from ‘check_rsa_pss’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
libgcrypt-1.11.2/tests/t-rsa-pss.c:91:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-pss.c:374:1: enter_function: entry to ‘check_rsa_pss’
libgcrypt-1.11.2/tests/t-rsa-pss.c:384:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-rsa-pss.c:385:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:388:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:18: call_function: calling ‘read_textline’ from ‘check_rsa_pss’
#   89|             if (feof (fp))
#   90|               return NULL;
#   91|->           die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|         ++*lineno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def228]
libgcrypt-1.11.2/tests/t-rsa-pss.c:93:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-pss.c:374:1: enter_function: entry to ‘check_rsa_pss’
libgcrypt-1.11.2/tests/t-rsa-pss.c:384:8: acquire_resource: opened here
libgcrypt-1.11.2/tests/t-rsa-pss.c:385:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:388:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:18: call_function: calling ‘read_textline’ from ‘check_rsa_pss’
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:18: return_function: returning to ‘check_rsa_pss’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:393:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:393:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:413:7: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:413:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-rsa-pss.c:93:9: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
libgcrypt-1.11.2/tests/t-rsa-pss.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-pss.c:374:1: enter_function: entry to ‘check_rsa_pss’
libgcrypt-1.11.2/tests/t-rsa-pss.c:384:8: acquire_memory: allocated here
libgcrypt-1.11.2/tests/t-rsa-pss.c:385:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:388:11: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:18: call_function: calling ‘read_textline’ from ‘check_rsa_pss’
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:18: return_function: returning to ‘check_rsa_pss’ from ‘read_textline’
libgcrypt-1.11.2/tests/t-rsa-pss.c:391:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:393:12: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:393:10: branch_true: following ‘true’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:413:7: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:413:7: throw: if ‘gcry_free’ throws an exception...
libgcrypt-1.11.2/tests/t-rsa-pss.c:93:9: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#   91|             die ("error reading input line: %s\n", strerror (errno));
#   92|           }
#   93|->       ++*lineno;
#   94|         p = strchr (line, '\n');
#   95|         if (!p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def230]
libgcrypt-1.11.2/tests/t-rsa-pss.c:427:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-pss.c:445:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-rsa-pss.c:503:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-rsa-pss.c:504:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:504:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-rsa-pss.c:504:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-rsa-pss.c:508:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:509:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:509:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:511:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:513:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:514:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:514:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:516:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:520:3: call_function: calling ‘check_rsa_pss’ from ‘main’
#  425|   
#  426|       }
#  427|->   xfree (n);
#  428|     xfree (e);
#  429|     xfree (d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
libgcrypt-1.11.2/tests/t-rsa-pss.c:427:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
libgcrypt-1.11.2/tests/t-rsa-pss.c:445:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/t-rsa-pss.c:503:6: branch_true: following ‘true’ branch (when ‘fname’ is NULL)...
libgcrypt-1.11.2/tests/t-rsa-pss.c:504:13: branch_true: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:504:13: call_function: calling ‘prepend_srcdir’ from ‘main’
libgcrypt-1.11.2/tests/t-rsa-pss.c:504:13: return_function: returning to ‘main’ from ‘prepend_srcdir’
libgcrypt-1.11.2/tests/t-rsa-pss.c:508:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:509:8: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:509:6: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:511:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:513:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:514:3: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:514:3: branch_false: following ‘false’ branch...
libgcrypt-1.11.2/tests/t-rsa-pss.c:516:7: branch_false: ...to here
libgcrypt-1.11.2/tests/t-rsa-pss.c:520:3: call_function: calling ‘check_rsa_pss’ from ‘main’
#  425|   
#  426|       }
#  427|->   xfree (n);
#  428|     xfree (e);
#  429|     xfree (d);

Error: CPPCHECK_WARNING (CWE-457): [#def232]
libgcrypt-1.11.2/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): [#def233]
libgcrypt-1.11.2/tests/testdrv.c:166:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  164|     (void) debug;
#  165|   
#  166|->   fflush (stdout);
#  167|   #ifdef HAVE_FLOCKFILE
#  168|     flockfile (stderr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
libgcrypt-1.11.2/tests/testdrv.c:204:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc((long unsigned int)(i + 2), 8)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  202|   {
#  203|     size_t n = strlen (s);
#  204|->   char *p = xmalloc (n+1);
#  205|     strcpy (p, s);
#  206|     return p;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
libgcrypt-1.11.2/tests/testdrv.c:320:10: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(bytes)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  318|         result[n++] = p;
#  319|       }
#  320|->   while (spacep (p))
#  321|       p++;
#  322|     for (px = p + strlen (p) - 1; px >= p && spacep (px); px--)

Error: COMPILER_WARNING (CWE-704): [#def236]
libgcrypt-1.11.2/tests/testdrv.c: scope_hint: In function ‘my_spawn’
libgcrypt-1.11.2/tests/testdrv.c:527:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  527 |   arg_list[0] = strrchr (pgmname, '/');
#      |               ^
#  525|         i++;
#  526|     arg_list = xcalloc (i+2, sizeof *arg_list);
#  527|->   arg_list[0] = strrchr (pgmname, '/');
#  528|     if (arg_list[0])
#  529|       arg_list[0]++;

Error: COMPILER_WARNING (CWE-704): [#def237]
libgcrypt-1.11.2/tests/testdrv.c:527:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  525|         i++;
#  526|     arg_list = xcalloc (i+2, sizeof *arg_list);
#  527|->   arg_list[0] = strrchr (pgmname, '/');
#  528|     if (arg_list[0])
#  529|       arg_list[0]++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
libgcrypt-1.11.2/tests/testdrv.c:529:5: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc((long unsigned int)(i + 2), 8)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  527|     arg_list[0] = strrchr (pgmname, '/');
#  528|     if (arg_list[0])
#  529|->     arg_list[0]++;
#  530|     else
#  531|       arg_list[0] = xstrdup (pgmname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
libgcrypt-1.11.2/tests/testdrv.c:540:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  538|     if (*pid == MYINVALID_PID)
#  539|       {
#  540|->       xfree (arg_list);
#  541|         fail ("error forking process: %s\n", strerror (errno));
#  542|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
libgcrypt-1.11.2/tests/testdrv.c:553:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  551|   
#  552|         /* Assign /dev/null to stdin. */
#  553|->       fd = open ("/dev/null", O_RDONLY);
#  554|         if (fd == -1)
#  555|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
libgcrypt-1.11.2/tests/testdrv.c:556:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  554|         if (fd == -1)
#  555|           {
#  556|->           xfree (arg_list);
#  557|             die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  558|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def242]
libgcrypt-1.11.2/tests/testdrv.c:559:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  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): [#def243]
libgcrypt-1.11.2/tests/testdrv.c:559:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 0), 0)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  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): [#def244]
libgcrypt-1.11.2/tests/testdrv.c:559:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  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-401): [#def245]
libgcrypt-1.11.2/tests/testdrv.c:561:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  559|         if (fd != 0 && dup2 (fd, 0) == -1)
#  560|           {
#  561|->           xfree (arg_list);
#  562|             die ("dup2(%d,0) failed: %s\n", fd, strerror (errno));
#  563|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def246]
libgcrypt-1.11.2/tests/testdrv.c:562:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  560|           {
#  561|             xfree (arg_list);
#  562|->           die ("dup2(%d,0) failed: %s\n", fd, strerror (errno));
#  563|           }
#  564|         /* Assign /dev/null to stdout unless in verbose mode. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
libgcrypt-1.11.2/tests/testdrv.c:567:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  565|         if (!verbose)
#  566|           {
#  567|->           fd = open ("/dev/null", O_RDONLY);
#  568|             if (fd == -1)
#  569|               {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
libgcrypt-1.11.2/tests/testdrv.c:570:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  568|             if (fd == -1)
#  569|               {
#  570|->               xfree (arg_list);
#  571|                 die ("failed to open '%s': %s\n", "/dev/null", strerror (errno));
#  572|               }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def249]
libgcrypt-1.11.2/tests/testdrv.c:573:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  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): [#def250]
libgcrypt-1.11.2/tests/testdrv.c:573:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 0), 1)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  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): [#def251]
libgcrypt-1.11.2/tests/testdrv.c:573:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  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-401): [#def252]
libgcrypt-1.11.2/tests/testdrv.c:575:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  573|             if (fd != 1 && dup2 (fd, 1) == -1)
#  574|               {
#  575|->               xfree (arg_list);
#  576|                 die ("dup2(%d,1) failed: %s\n", fd, strerror (errno));
#  577|               }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def253]
libgcrypt-1.11.2/tests/testdrv.c:576:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  574|               {
#  575|                 xfree (arg_list);
#  576|->               die ("dup2(%d,1) failed: %s\n", fd, strerror (errno));
#  577|               }
#  578|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
libgcrypt-1.11.2/tests/testdrv.c:588:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libgcrypt-1.11.2/tests/testdrv.c:784:1: enter_function: entry to ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: call_function: calling ‘xcalloc’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:846:15: return_function: returning to ‘main’ from ‘xcalloc’
libgcrypt-1.11.2/tests/testdrv.c:847:18: call_function: calling ‘xstrdup’ from ‘main’
libgcrypt-1.11.2/tests/testdrv.c:847:18: return_function: returning to ‘main’ from ‘xstrdup’
libgcrypt-1.11.2/tests/testdrv.c:853:6: branch_false: following ‘false’ branch (when ‘listtests != 1’)...
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:873:11: branch_false: following ‘false’ branch (when ‘listtests != 2’)...
libgcrypt-1.11.2/tests/testdrv.c:888:7: branch_false: ...to here
libgcrypt-1.11.2/tests/testdrv.c:889:7: call_function: calling ‘runtests’ from ‘main’
#  586|   
#  587|     /* This is the parent. */
#  588|->   xfree (arg_list);
#  589|     return 0;
#  590|   #endif /*!HAVE_W32_SYSTEM*/

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-153.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibgcrypt-1.11.2-1.fc44
store-results-to/tmp/tmp57dmscjx/libgcrypt-1.11.2-1.fc44.tar.xz
time-created2026-01-08 18:53:56
time-finished2026-01-08 18:56:54
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp57dmscjx/libgcrypt-1.11.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp57dmscjx/libgcrypt-1.11.2-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9