Task #90859 - fixed.err
back to task #90859download
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/examples/c/encode/file/main.c:72:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "rb")’
flac-1.5.0/examples/c/encode/file/main.c:59:11: branch_false: following ‘false’ branch (when ‘argc == 3’)...
flac-1.5.0/examples/c/encode/file/main.c:64:19: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:64:19: acquire_resource: opened here
flac-1.5.0/examples/c/encode/file/main.c:64:11: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:70:11: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:72:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:73:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:74:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:80:38: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:86:23: throw: if ‘FLAC__stream_encoder_new’ throws an exception...
flac-1.5.0/examples/c/encode/file/main.c:72:17: danger: ‘fopen(argv[1], "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 70| if(
# 71| fread(buffer, 1, 44, fin) != 44 ||
# 72|-> memcmp(buffer, "RIFF", 4) ||
# 73| memcmp(buffer+8, "WAVEfmt \020\000\000\000\001\000\002\000", 16) ||
# 74| memcmp(buffer+32, "\004\000\020\000data", 8)
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/examples/c/encode/file/main.c:72:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "rb")’
flac-1.5.0/examples/c/encode/file/main.c:59:11: branch_false: following ‘false’ branch (when ‘argc == 3’)...
flac-1.5.0/examples/c/encode/file/main.c:64:19: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:64:19: acquire_memory: allocated here
flac-1.5.0/examples/c/encode/file/main.c:64:11: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:70:11: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:72:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:73:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:74:17: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:71:17: branch_false: following ‘false’ branch...
flac-1.5.0/examples/c/encode/file/main.c:80:38: branch_false: ...to here
flac-1.5.0/examples/c/encode/file/main.c:86:23: throw: if ‘FLAC__stream_encoder_new’ throws an exception...
flac-1.5.0/examples/c/encode/file/main.c:72:17: danger: ‘fopen(argv[1], "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 70| if(
# 71| fread(buffer, 1, 44, fin) != 44 ||
# 72|-> memcmp(buffer, "RIFF", 4) ||
# 73| memcmp(buffer+8, "WAVEfmt \020\000\000\000\001\000\002\000", 16) ||
# 74| memcmp(buffer+32, "\004\000\020\000data", 8)
Error: GCC_ANALYZER_WARNING (CWE-789):
flac-1.5.0/include/share/alloc.h:98:16: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buffer_size + 4’ as allocation size without upper-bounds checking
flac-1.5.0/src/metaflac/operations.c:284:15: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations.c:286:46: branch_true: ...to here
flac-1.5.0/src/metaflac/operations.c:287:26: call_function: inlined call to ‘safe_malloc_’ from ‘do_major_operation__append’
# 96| if(!size)
# 97| size++;
# 98|-> return malloc(size);
# 99| }
# 100|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/include/share/alloc.h:122:12: warning[-Wanalyzer-malloc-leak]: leak of 'safe_calloc_((long unsigned int)num_tracks, 32)'
flac-1.5.0/src/libFLAC/metadata_object.c:2007:6: enter_function: entry to 'metadata_callback_'
flac-1.5.0/src/libFLAC/metadata_object.c:2017:39: call_function: calling 'FLAC__metadata_object_clone' from 'metadata_callback_'
# 120| return NULL;
# 121| #endif
# 122|-> if(!nmemb || !size)
# 123| return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always allocate */
# 124| return calloc(nmemb, size);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/flac/decode.c:341:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_resource: opened here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:341:25: branch_true: ...to here
flac-1.5.0/src/flac/decode.c:341:25: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/decode.c:341:25: danger: ‘fopen(infilename, "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 339|
# 340| if(fread(buffer, 1, 3, f) < 3) {
# 341|-> flac__utils_printf(stderr, 1, "%s: ERROR checking for ID3v2 tag\n", decoder_session->inbasefilename);
# 342| fclose(f);
# 343| return false;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/decode.c:341:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_memory: allocated here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:341:25: branch_true: ...to here
flac-1.5.0/src/flac/decode.c:341:25: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/decode.c:341:25: danger: ‘fopen(infilename, "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 339|
# 340| if(fread(buffer, 1, 3, f) < 3) {
# 341|-> flac__utils_printf(stderr, 1, "%s: ERROR checking for ID3v2 tag\n", decoder_session->inbasefilename);
# 342| fclose(f);
# 343| return false;
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/flac/decode.c:346:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_resource: opened here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:345:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:345:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:346:25: branch_true: ...to here
flac-1.5.0/src/flac/decode.c:346:25: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/decode.c:346:25: danger: ‘fopen(infilename, "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 344| }
# 345| if(memcmp(buffer, "ID3", 3) == 0){
# 346|-> flac__utils_printf(stderr, 1, "%s: WARNING, ID3v2 tag found. This is non-standard and strongly discouraged\n", decoder_session->inbasefilename);
# 347| if(decoder_session->treat_warnings_as_errors) {
# 348| fclose(f);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/decode.c:346:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_memory: allocated here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:345:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:345:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:346:25: branch_true: ...to here
flac-1.5.0/src/flac/decode.c:346:25: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/decode.c:346:25: danger: ‘fopen(infilename, "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 344| }
# 345| if(memcmp(buffer, "ID3", 3) == 0){
# 346|-> flac__utils_printf(stderr, 1, "%s: WARNING, ID3v2 tag found. This is non-standard and strongly discouraged\n", decoder_session->inbasefilename);
# 347| if(decoder_session->treat_warnings_as_errors) {
# 348| fclose(f);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/flac/decode.c:352:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_resource: opened here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:345:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:352:20: throw: if ‘fseek’ throws an exception...
flac-1.5.0/src/flac/decode.c:352:20: danger: ‘fopen(infilename, "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 350| }
# 351| }
# 352|-> if(fseek(f, -128, SEEK_END) == 0 && fread(buffer, 1, 3, f) == 3 && memcmp(buffer, "TAG", 3) == 0){
# 353| flac__utils_printf(stderr, 1, "%s: NOTE, found something that looks like an ID3v1 tag. If decoding returns an error, this ID3v1 tag is probably the cause.\n", decoder_session->inbasefilename);
# 354| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/decode.c:352:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_memory: allocated here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:345:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:352:20: throw: if ‘fseek’ throws an exception...
flac-1.5.0/src/flac/decode.c:352:20: danger: ‘fopen(infilename, "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 350| }
# 351| }
# 352|-> if(fseek(f, -128, SEEK_END) == 0 && fread(buffer, 1, 3, f) == 3 && memcmp(buffer, "TAG", 3) == 0){
# 353| flac__utils_printf(stderr, 1, "%s: NOTE, found something that looks like an ID3v1 tag. If decoding returns an error, this ID3v1 tag is probably the cause.\n", decoder_session->inbasefilename);
# 354| }
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/flac/decode.c:353:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_resource: opened here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:345:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:352:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:353:25: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/decode.c:353:25: danger: ‘fopen(infilename, "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 351| }
# 352| if(fseek(f, -128, SEEK_END) == 0 && fread(buffer, 1, 3, f) == 3 && memcmp(buffer, "TAG", 3) == 0){
# 353|-> flac__utils_printf(stderr, 1, "%s: NOTE, found something that looks like an ID3v1 tag. If decoding returns an error, this ID3v1 tag is probably the cause.\n", decoder_session->inbasefilename);
# 354| }
# 355| fclose(f);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/decode.c:353:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(infilename, "rb")’
flac-1.5.0/src/flac/decode.c:329:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:335:30: acquire_memory: allocated here
flac-1.5.0/src/flac/decode.c:335:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:340:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:340:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/decode.c:345:20: branch_false: ...to here
flac-1.5.0/src/flac/decode.c:352:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/decode.c:353:25: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/decode.c:353:25: danger: ‘fopen(infilename, "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 351| }
# 352| if(fseek(f, -128, SEEK_END) == 0 && fread(buffer, 1, 3, f) == 3 && memcmp(buffer, "TAG", 3) == 0){
# 353|-> flac__utils_printf(stderr, 1, "%s: NOTE, found something that looks like an ID3v1 tag. If decoding returns an error, this ID3v1 tag is probably the cause.\n", decoder_session->inbasefilename);
# 354| }
# 355| fclose(f);
Error: GCC_ANALYZER_WARNING (CWE-457):
flac-1.5.0/src/flac/encode.c:1487:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*e.fmt.flac.client_data.num_metadata_blocks’
flac-1.5.0/src/flac/encode.c:862:5: enter_function: entry to ‘flac__encode_file’
flac-1.5.0/src/flac/encode.c:867:13: call_function: calling ‘EncoderSession_construct’ from ‘flac__encode_file’
# 1485| FLAC__stream_decoder_delete(e->fmt.flac.decoder);
# 1486| e->fmt.flac.decoder = 0;
# 1487|-> for(i = 0; i < e->fmt.flac.client_data.num_metadata_blocks; i++)
# 1488| FLAC__metadata_object_delete(e->fmt.flac.client_data.metadata_blocks[i]);
# 1489| e->fmt.flac.client_data.num_metadata_blocks = 0;
Error: COMPILER_WARNING (CWE-457):
flac-1.5.0/src/flac/encode.c:2227:11: warning[-Wmaybe-uninitialized]: 'has_real_points' may be used uninitialized
# 2227 | if(has_real_points) {
# | ^
flac-1.5.0/src/flac/encode.c: scope_hint: In function 'EncoderSession_init_encoder'
flac-1.5.0/src/flac/encode.c:2191:20: note: 'has_real_points' was declared here
# 2191 | FLAC__bool has_real_points;
# | ^
# 2225| }
# 2226|
# 2227|-> if(has_real_points) {
# 2228| if(e->is_stdout) {
# 2229| flac__utils_printf(stderr, 1, "%s: WARNING, cannot write back seekpoints when encoding to stdout\n", e->inbasefilename);
Error: CPPCHECK_WARNING (CWE-476):
flac-1.5.0/src/flac/main.c:721: warning[nullPointer]: Possible null pointer dereference: long_option
# 719| if(short_option == 0) {
# 720| FLAC__ASSERT(0 != long_option);
# 721|-> if(0 == strcmp(long_option, "totally-silent")) {
# 722| flac__utils_verbosity_ = 0;
# 723| }
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/flac/main.c:1455:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘encode_infile’
flac-1.5.0/src/flac/main.c:1458:5: enter_function: entry to ‘encode_file’
flac-1.5.0/src/flac/main.c:1472:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1477:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1477:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/flac/main.c:1483:30: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1484:42: acquire_resource: opened here
flac-1.5.0/src/flac/main.c:1484:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1490:13: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1490:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/main.c:1492:37: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1511:19: branch_true: following ‘true’ branch (when ‘lookahead_length <= 11’)...
flac-1.5.0/src/flac/main.c:1513:27: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1513:27: branch_true: following ‘true’ branch (when ‘input_format != 0’)...
flac-1.5.0/src/flac/main.c:1514:33: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1514:33: call_function: calling ‘format_mistake’ from ‘encode_file’
# 1453| {
# 1454| /* WATCHOUT: indexed by FileFormat */
# 1455|-> flac__utils_printf(stderr, 1, "WARNING: %s is not a%s file; treating as a%s file\n", infilename, FileFormatString[wrong], FileFormatString[right]);
# 1456| }
# 1457|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/main.c:1455:9: warning[-Wanalyzer-malloc-leak]: leak of ‘encode_infile’
flac-1.5.0/src/flac/main.c:1458:5: enter_function: entry to ‘encode_file’
flac-1.5.0/src/flac/main.c:1472:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1477:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1477:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/flac/main.c:1483:30: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1484:42: acquire_memory: allocated here
flac-1.5.0/src/flac/main.c:1484:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1490:13: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1490:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/main.c:1492:37: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1511:19: branch_true: following ‘true’ branch (when ‘lookahead_length <= 11’)...
flac-1.5.0/src/flac/main.c:1513:27: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1513:27: branch_true: following ‘true’ branch (when ‘input_format != 0’)...
flac-1.5.0/src/flac/main.c:1514:33: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1514:33: call_function: calling ‘format_mistake’ from ‘encode_file’
# 1453| {
# 1454| /* WATCHOUT: indexed by FileFormat */
# 1455|-> flac__utils_printf(stderr, 1, "WARNING: %s is not a%s file; treating as a%s file\n", infilename, FileFormatString[wrong], FileFormatString[right]);
# 1456| }
# 1457|
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/flac/main.c:1525:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘encode_infile’
flac-1.5.0/src/flac/main.c:1472:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1477:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1477:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/flac/main.c:1483:30: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1484:42: acquire_resource: opened here
flac-1.5.0/src/flac/main.c:1484:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1490:13: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1490:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/main.c:1492:37: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1511:19: branch_false: following ‘false’ branch (when ‘lookahead_length > 11’)...
flac-1.5.0/src/flac/main.c:1524:29: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1524:27: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/main.c:1525:33: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1525:33: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/main.c:1525:33: danger: ‘encode_infile’ leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 1523| else {
# 1524| if(!memcmp(lookahead, "ID3", 3)) {
# 1525|-> flac__utils_printf(stderr, 1, "ERROR: input file %s has an ID3v2 tag\n", infilename);
# 1526| conditional_fclose(encode_infile);
# 1527| return 1;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/main.c:1525:33: warning[-Wanalyzer-malloc-leak]: leak of ‘encode_infile’
flac-1.5.0/src/flac/main.c:1472:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1477:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1477:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/flac/main.c:1483:30: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1484:42: acquire_memory: allocated here
flac-1.5.0/src/flac/main.c:1484:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1490:13: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1490:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/main.c:1492:37: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1511:19: branch_false: following ‘false’ branch (when ‘lookahead_length > 11’)...
flac-1.5.0/src/flac/main.c:1524:29: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1524:27: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/main.c:1525:33: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1525:33: throw: if ‘flac__utils_printf’ throws an exception...
flac-1.5.0/src/flac/main.c:1525:33: danger: ‘encode_infile’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 1523| else {
# 1524| if(!memcmp(lookahead, "ID3", 3)) {
# 1525|-> flac__utils_printf(stderr, 1, "ERROR: input file %s has an ID3v2 tag\n", infilename);
# 1526| conditional_fclose(encode_infile);
# 1527| return 1;
Error: CPPCHECK_WARNING (CWE-404):
flac-1.5.0/src/flac/main.c:1576: error[resourceLeak]: Resource leak: encode_infile
# 1574| flac__utils_printf(stderr, 1, "WARNING: %s chunk size of file %s does not agree with filesize\n", (input_format == FORMAT_WAVE)?"RIFF":"FORM", infilename);
# 1575| if(option_values.treat_warnings_as_errors)
# 1576|-> return 1;
# 1577| }
# 1578| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/main.c:1726:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(dest_len)’
flac-1.5.0/src/flac/main.c:1458:5: enter_function: entry to ‘encode_file’
flac-1.5.0/src/flac/main.c:1472:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1477:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1477:11: branch_true: following ‘true’ branch (when the strings are equal)...
flac-1.5.0/src/flac/main.c:1479:33: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1490:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1559:13: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1567:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1580:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1635:11: branch_true: following ‘true’ branch (when ‘input_format == 0’)...
flac-1.5.0/src/flac/main.c:1636:20: branch_true: ...to here
flac-1.5.0/src/flac/main.c:1636:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1659:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1664:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1669:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1677:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1684:40: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1717:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/main.c:1721:44: call_function: inlined call to ‘safe_malloc_’ from ‘encode_file’
flac-1.5.0/src/flac/main.c:1721:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1726:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1726:17: throw: if ‘flac_snprintf’ throws an exception...
flac-1.5.0/src/flac/main.c:1726:17: danger: ‘malloc(dest_len)’ leaks here; was allocated at [(25)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/24)
# 1724| return 1;
# 1725| }
# 1726|-> flac_snprintf(internal_outfilename, dest_len, "%s%s", outfilename, tmp_suffix);
# 1727| }
# 1728|
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/flac/main.c:2068:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘encode_infile’
flac-1.5.0/src/flac/main.c:1458:5: enter_function: entry to ‘encode_file’
flac-1.5.0/src/flac/main.c:1472:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1477:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1477:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/flac/main.c:1483:30: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1484:42: acquire_resource: opened here
flac-1.5.0/src/flac/main.c:1484:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1490:13: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1526:33: call_function: calling ‘conditional_fclose’ from ‘encode_file’
flac-1.5.0/src/flac/main.c:1526:33: return_function: returning to ‘encode_file’ from ‘conditional_fclose’
flac-1.5.0/src/flac/main.c:2068:16: danger: ‘encode_infile’ leaks here; was opened at [(6)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/5)
# 2066| }
# 2067|
# 2068|-> return get_outfilename(p, suffix);
# 2069| }
# 2070|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/main.c:2068:16: warning[-Wanalyzer-malloc-leak]: leak of ‘encode_infile’
flac-1.5.0/src/flac/main.c:1458:5: enter_function: entry to ‘encode_file’
flac-1.5.0/src/flac/main.c:1472:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1477:17: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1477:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/flac/main.c:1483:30: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1484:42: acquire_memory: allocated here
flac-1.5.0/src/flac/main.c:1484:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/main.c:1490:13: branch_false: ...to here
flac-1.5.0/src/flac/main.c:1526:33: call_function: calling ‘conditional_fclose’ from ‘encode_file’
flac-1.5.0/src/flac/main.c:1526:33: return_function: returning to ‘encode_file’ from ‘conditional_fclose’
flac-1.5.0/src/flac/main.c:2068:16: danger: ‘encode_infile’ leaks here; was allocated at [(6)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/5)
# 2066| }
# 2067|
# 2068|-> return get_outfilename(p, suffix);
# 2069| }
# 2070|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:148:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
flac-1.5.0/src/flac/vorbiscomment.c:114:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:118:69: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:119:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:123:19: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:123:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:127:40: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:127:33: acquire_memory: allocated here
flac-1.5.0/src/flac/vorbiscomment.c:127:19: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
flac-1.5.0/src/flac/vorbiscomment.c:129:21: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:130:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:138:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:145:19: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:145:19: branch_false: following ‘false’ branch (when ‘raw == 0’)...
flac-1.5.0/src/flac/vorbiscomment.c:148:25: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:148:25: throw: if ‘utf8_encode’ throws an exception...
flac-1.5.0/src/flac/vorbiscomment.c:148:25: danger: ‘data’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
# 146| converted = data;
# 147| }
# 148|-> else if(utf8_encode(data, &converted) >= 0) {
# 149| free(data);
# 150| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:158:21: warning[-Wanalyzer-malloc-leak]: leak of ‘converted’
flac-1.5.0/src/flac/vorbiscomment.c:114:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:118:69: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:119:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:123:19: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:123:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:127:40: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:127:33: acquire_memory: allocated here
flac-1.5.0/src/flac/vorbiscomment.c:127:19: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
flac-1.5.0/src/flac/vorbiscomment.c:129:21: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:130:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:138:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:145:19: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:145:19: branch_true: following ‘true’ branch (when ‘raw != 0’)...
flac-1.5.0/src/flac/vorbiscomment.c:146:25: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:158:21: throw: if ‘FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair’ throws an exception...
flac-1.5.0/src/flac/vorbiscomment.c:158:21: danger: ‘converted’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
# 156|
# 157| /* create and entry and append it */
# 158|-> if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, field->field_name, converted)) {
# 159| free(converted);
# 160| *violation = "file for tag value is not valid UTF-8";
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:164:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field_name’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 162| }
# 163| free(converted);
# 164|-> if(!FLAC__metadata_object_vorbiscomment_append_comment(block, entry, /*copy=*/false)) {
# 165| free(entry.entry);
# 166| *violation = "memory allocation failure";
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:164:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field_value’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 162| }
# 163| free(converted);
# 164|-> if(!FLAC__metadata_object_vorbiscomment_append_comment(block, entry, /*copy=*/false)) {
# 165| free(entry.entry);
# 166| *violation = "memory allocation failure";
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:164:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 162| }
# 163| free(converted);
# 164|-> if(!FLAC__metadata_object_vorbiscomment_append_comment(block, entry, /*copy=*/false)) {
# 165| free(entry.entry);
# 166| *violation = "memory allocation failure";
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:181:25: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field_name’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 179| entry.entry = (FLAC__byte *)field->field;
# 180| }
# 181|-> else if(utf8_encode(field->field, &converted) >= 0) {
# 182| entry.entry = (FLAC__byte *)converted;
# 183| needs_free = true;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:181:25: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field_value’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 179| entry.entry = (FLAC__byte *)field->field;
# 180| }
# 181|-> else if(utf8_encode(field->field, &converted) >= 0) {
# 182| entry.entry = (FLAC__byte *)converted;
# 183| needs_free = true;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:181:25: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 179| entry.entry = (FLAC__byte *)field->field;
# 180| }
# 181|-> else if(utf8_encode(field->field, &converted) >= 0) {
# 182| entry.entry = (FLAC__byte *)converted;
# 183| needs_free = true;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:191:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field_name’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 189| #endif
# 190| entry.length = strlen((const char *)entry.entry);
# 191|-> if(!FLAC__format_vorbiscomment_entry_is_legal(entry.entry, entry.length)) {
# 192| if(needs_free)
# 193| free(converted);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:191:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field_value’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 189| #endif
# 190| entry.length = strlen((const char *)entry.entry);
# 191|-> if(!FLAC__format_vorbiscomment_entry_is_legal(entry.entry, entry.length)) {
# 192| if(needs_free)
# 193| free(converted);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/flac/vorbiscomment.c:191:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parsed.field’
flac-1.5.0/src/flac/vorbiscomment.c:230:12: enter_function: entry to ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: call_function: calling ‘parse_vorbis_comment_field’ from ‘flac__vorbiscomment_add’
flac-1.5.0/src/flac/vorbiscomment.c:242:13: return_function: returning to ‘flac__vorbiscomment_add’ from ‘parse_vorbis_comment_field’
flac-1.5.0/src/flac/vorbiscomment.c:242:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:12: branch_false: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/flac/vorbiscomment.c:247:46: branch_true: ...to here
flac-1.5.0/src/flac/vorbiscomment.c:247:46: call_function: calling ‘set_vc_field’ from ‘flac__vorbiscomment_add’
# 189| #endif
# 190| entry.length = strlen((const char *)entry.entry);
# 191|-> if(!FLAC__format_vorbiscomment_entry_is_legal(entry.entry, entry.length)) {
# 192| if(needs_free)
# 193| free(converted);
Error: COMPILER_WARNING (CWE-9001):
flac-1.5.0/src/libFLAC/bitwriter.c: scope_hint: In function 'FLAC__add_metadata_block'
flac-1.5.0/src/libFLAC/bitwriter.c:354:19: warning[-Winline]: inlining failed in call to 'FLAC__bitwriter_write_raw_uint32': call is unlikely and code size would grow
# 354 | inline FLAC__bool FLAC__bitwriter_write_raw_uint32(FLAC__BitWriter *bw, FLAC__uint32 val, uint32_t bits)
# | ^
flac-1.5.0/src/libFLAC/stream_encoder_framing.c:96:29: note: called from here
# 96 | if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.channels-1, FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN))
# | ^
# 352| }
# 353|
# 354|-> inline FLAC__bool FLAC__bitwriter_write_raw_uint32(FLAC__BitWriter *bw, FLAC__uint32 val, uint32_t bits)
# 355| {
# 356| /* check that unused bits are unset */
Error: COMPILER_WARNING (CWE-9001):
flac-1.5.0/src/libFLAC/bitwriter.c:372:19: warning[-Winline]: inlining failed in call to 'FLAC__bitwriter_write_raw_uint64': --param max-inline-insns-single limit reached
# 372 | inline FLAC__bool FLAC__bitwriter_write_raw_uint64(FLAC__BitWriter *bw, FLAC__uint64 val, uint32_t bits)
# | ^
flac-1.5.0/src/libFLAC/stream_encoder_framing.c:103:37: note: called from here
# 103 | if(!FLAC__bitwriter_write_raw_uint64(bw, 0, FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN))
# | ^
# 370| }
# 371|
# 372|-> inline FLAC__bool FLAC__bitwriter_write_raw_uint64(FLAC__BitWriter *bw, FLAC__uint64 val, uint32_t bits)
# 373| {
# 374| /* this could be a little faster but it's not used for much */
Error: COMPILER_WARNING (CWE-9001):
flac-1.5.0/src/libFLAC/bitwriter.c:393:19: warning[-Winline]: inlining failed in call to 'FLAC__bitwriter_write_raw_uint32_little_endian': --param max-inline-insns-single limit reached
# 393 | inline FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian(FLAC__BitWriter *bw, FLAC__uint32 val)
# | ^
flac-1.5.0/src/libFLAC/stream_encoder_framing.c:134:37: note: called from here
# 134 | if(!FLAC__bitwriter_write_raw_uint32_little_endian(bw, vendor_string_length))
# | ^
# 391| }
# 392|
# 393|-> inline FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian(FLAC__BitWriter *bw, FLAC__uint32 val)
# 394| {
# 395| /* this doesn't need to be that fast as currently it is only used for vorbis comments */
Error: COMPILER_WARNING (CWE-9001):
flac-1.5.0/src/libFLAC/bitwriter.c:409:19: warning[-Winline]: inlining failed in call to 'FLAC__bitwriter_write_byte_block': call is unlikely and code size would grow
# 409 | inline FLAC__bool FLAC__bitwriter_write_byte_block(FLAC__BitWriter *bw, const FLAC__byte vals[], uint32_t nvals)
# | ^
flac-1.5.0/src/libFLAC/stream_encoder_framing.c:109:29: note: called from here
# 109 | if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.stream_info.md5sum, 16))
# | ^
# 407| }
# 408|
# 409|-> inline FLAC__bool FLAC__bitwriter_write_byte_block(FLAC__BitWriter *bw, const FLAC__byte vals[], uint32_t nvals)
# 410| {
# 411| uint32_t i;
Error: CPPCHECK_WARNING (CWE-758):
flac-1.5.0/src/libFLAC/bitwriter.c:616: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 614| uval = *vals;
# 615| uval <<= 1;
# 616|-> uval ^= (*vals>>31);
# 617|
# 618| msbits = uval >> parameter;
Error: GCC_ANALYZER_WARNING (CWE-131):
flac-1.5.0/src/libFLAC/memory.c:79:14: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
flac-1.5.0/src/libFLAC/memory.c:63:12: enter_function: entry to 'FLAC__memory_alloc_aligned_int32_array'
flac-1.5.0/src/libFLAC/memory.c:76:11: branch_false: following 'false' branch (when 'elements <= 4611686018427387903')...
flac-1.5.0/src/libFLAC/memory.c:79:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/memory.c:79:14: call_function: calling 'FLAC__memory_alloc_aligned' from 'FLAC__memory_alloc_aligned_int32_array'
flac-1.5.0/src/libFLAC/memory.c:79:14: danger: assigned to 'FLAC__int32 *' {{aka 'int *'}} here; 'sizeof (FLAC__int32 {{aka int}})' is '4'
# 77| return false;
# 78|
# 79|-> pu = FLAC__memory_alloc_aligned(sizeof(*pu) * elements, &u.pv);
# 80| if(0 == pu) {
# 81| return false;
Error: GCC_ANALYZER_WARNING (CWE-131):
flac-1.5.0/src/libFLAC/memory.c:108:14: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
flac-1.5.0/src/libFLAC/memory.c:92:12: enter_function: entry to 'FLAC__memory_alloc_aligned_uint32_array'
flac-1.5.0/src/libFLAC/memory.c:105:11: branch_false: following 'false' branch (when 'elements <= 4611686018427387903')...
flac-1.5.0/src/libFLAC/memory.c:108:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/memory.c:108:14: call_function: calling 'FLAC__memory_alloc_aligned' from 'FLAC__memory_alloc_aligned_uint32_array'
flac-1.5.0/src/libFLAC/memory.c:108:14: danger: assigned to 'FLAC__uint32 *' {{aka 'unsigned int *'}} here; 'sizeof (FLAC__uint32 {{aka unsigned int}})' is '4'
# 106| return false;
# 107|
# 108|-> pu = FLAC__memory_alloc_aligned(sizeof(*pu) * elements, &u.pv);
# 109| if(0 == pu) {
# 110| return false;
Error: GCC_ANALYZER_WARNING (CWE-131):
flac-1.5.0/src/libFLAC/memory.c:137:14: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
flac-1.5.0/src/libFLAC/memory.c:121:12: enter_function: entry to 'FLAC__memory_alloc_aligned_int64_array'
flac-1.5.0/src/libFLAC/memory.c:134:11: branch_false: following 'false' branch (when 'elements <= 2305843009213693951')...
flac-1.5.0/src/libFLAC/memory.c:137:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/memory.c:137:14: call_function: calling 'FLAC__memory_alloc_aligned' from 'FLAC__memory_alloc_aligned_int64_array'
flac-1.5.0/src/libFLAC/memory.c:137:14: danger: assigned to 'FLAC__int64 *' {{aka 'long int *'}} here; 'sizeof (FLAC__int64 {{aka long int}})' is '8'
# 135| return false;
# 136|
# 137|-> pu = FLAC__memory_alloc_aligned(sizeof(*pu) * elements, &u.pv);
# 138| if(0 == pu) {
# 139| return false;
Error: GCC_ANALYZER_WARNING (CWE-131):
flac-1.5.0/src/libFLAC/memory.c:166:14: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
flac-1.5.0/src/libFLAC/memory.c:150:12: enter_function: entry to 'FLAC__memory_alloc_aligned_uint64_array'
flac-1.5.0/src/libFLAC/memory.c:163:11: branch_false: following 'false' branch (when 'elements <= 2305843009213693951')...
flac-1.5.0/src/libFLAC/memory.c:166:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/memory.c:166:14: call_function: calling 'FLAC__memory_alloc_aligned' from 'FLAC__memory_alloc_aligned_uint64_array'
flac-1.5.0/src/libFLAC/memory.c:166:14: danger: assigned to 'FLAC__uint64 *' {{aka 'long unsigned int *'}} here; 'sizeof (FLAC__uint64 {{aka long unsigned int}})' is '8'
# 164| return false;
# 165|
# 166|-> pu = FLAC__memory_alloc_aligned(sizeof(*pu) * elements, &u.pv);
# 167| if(0 == pu) {
# 168| return false;
Error: GCC_ANALYZER_WARNING (CWE-131):
flac-1.5.0/src/libFLAC/memory.c:197:14: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
flac-1.5.0/src/libFLAC/memory.c:181:12: enter_function: entry to 'FLAC__memory_alloc_aligned_real_array'
flac-1.5.0/src/libFLAC/memory.c:194:11: branch_false: following 'false' branch (when 'elements <= 4611686018427387903')...
flac-1.5.0/src/libFLAC/memory.c:197:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/memory.c:197:14: call_function: calling 'FLAC__memory_alloc_aligned' from 'FLAC__memory_alloc_aligned_real_array'
flac-1.5.0/src/libFLAC/memory.c:197:14: danger: assigned to 'FLAC__real *' {{aka 'float *'}} here; 'sizeof (FLAC__real {{aka float}})' is '4'
# 195| return false;
# 196|
# 197|-> pu = FLAC__memory_alloc_aligned(sizeof(*pu) * elements, &u.pv);
# 198| if(0 == pu) {
# 199| return false;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/metadata_object.c:153:13: warning[-Wanalyzer-malloc-leak]: leak of 'FLAC__metadata_object_cuesheet_track_new()'
flac-1.5.0/src/libFLAC/metadata_object.c:1482:47: enter_function: entry to 'FLAC__metadata_object_cuesheet_track_clone'
flac-1.5.0/src/libFLAC/metadata_object.c:1488:19: call_function: calling 'FLAC__metadata_object_cuesheet_track_new' from 'FLAC__metadata_object_cuesheet_track_clone'
flac-1.5.0/src/libFLAC/metadata_object.c:1488:19: return_function: returning to 'FLAC__metadata_object_cuesheet_track_clone' from 'FLAC__metadata_object_cuesheet_track_new'
flac-1.5.0/src/libFLAC/metadata_object.c:1488:12: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1489:22: branch_true: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1489:22: call_function: calling 'copy_track_' from 'FLAC__metadata_object_cuesheet_track_clone'
# 151| {
# 152| memcpy(to, from, sizeof(FLAC__StreamMetadata_CueSheet_Track));
# 153|-> if (from->indices == 0) {
# 154| FLAC__ASSERT(from->num_indices == 0);
# 155| }
Error: GCC_ANALYZER_WARNING (CWE-131):
flac-1.5.0/src/libFLAC/metadata_object.c:214:16: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
flac-1.5.0/src/libFLAC/metadata_object.c:1456:14: enter_function: entry to 'FLAC__metadata_object_vorbiscomment_remove_entries_matching'
flac-1.5.0/src/libFLAC/metadata_object.c:1467:69: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1468:71: branch_true: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1468:20: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1469:25: branch_true: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1470:31: call_function: calling 'FLAC__metadata_object_vorbiscomment_delete_comment' from 'FLAC__metadata_object_vorbiscomment_remove_entries_matching'
flac-1.5.0/src/libFLAC/metadata_object.c:1470:31: return_function: returning to 'FLAC__metadata_object_vorbiscomment_remove_entries_matching' from 'FLAC__metadata_object_vorbiscomment_delete_comment'
flac-1.5.0/src/libFLAC/metadata_object.c:1467:69: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1468:71: branch_true: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1468:20: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1469:25: branch_true: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1470:31: call_function: calling 'FLAC__metadata_object_vorbiscomment_delete_comment' from 'FLAC__metadata_object_vorbiscomment_remove_entries_matching'
# 212| FLAC__ASSERT(num_comments > 0);
# 213|
# 214|-> return safe_calloc_(num_comments, sizeof(FLAC__StreamMetadata_VorbisComment_Entry));
# 215| }
# 216|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/metadata_object.c:320:17: warning[-Wanalyzer-malloc-leak]: leak of 'FLAC__metadata_object_new(*object.type)'
flac-1.5.0/src/libFLAC/metadata_object.c:2007:6: enter_function: entry to 'metadata_callback_'
flac-1.5.0/src/libFLAC/metadata_object.c:2017:39: call_function: calling 'FLAC__metadata_object_clone' from 'metadata_callback_'
# 318|
# 319| object->length = (
# 320|-> FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN +
# 321| FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN +
# 322| FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN +
Error: GCC_ANALYZER_WARNING (CWE-476):
flac-1.5.0/src/libFLAC/metadata_object.c:338:35: warning[-Wanalyzer-null-dereference]: dereference of NULL '*object.data.cue_sheet.tracks'
flac-1.5.0/src/libFLAC/metadata_object.c:1611:21: enter_function: entry to 'FLAC__metadata_object_cuesheet_resize_tracks'
flac-1.5.0/src/libFLAC/metadata_object.c:1616:12: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1624:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1628:20: branch_false: following 'false' branch (when 'new_num_tracks <= 134217727')...
flac-1.5.0/src/libFLAC/metadata_object.c:1634:20: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1634:20: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1640:20: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1640:20: branch_true: following 'true' branch (when 'new_size == 0')...
flac-1.5.0/src/libFLAC/metadata_object.c:1641:30: branch_true: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1659:9: call_function: calling 'cuesheet_calculate_length_' from 'FLAC__metadata_object_cuesheet_resize_tracks'
# 336|
# 337| for (i = 0; i < object->data.cue_sheet.num_tracks; i++) {
# 338|-> object->length += object->data.cue_sheet.tracks[i].num_indices * (
# 339| FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN +
# 340| FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN +
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/metadata_object.c:1909:9: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(max(bytes, 1))'
flac-1.5.0/src/libFLAC/metadata_object.c:1872:23: enter_function: entry to 'FLAC__metadata_object_get_raw'
flac-1.5.0/src/libFLAC/metadata_object.c:1881:11: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1883:13: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1883:11: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1887:13: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1887:11: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1892:13: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1892:11: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1898:22: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1898:11: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1903:18: call_function: inlined call to 'safe_malloc_' from 'FLAC__metadata_object_get_raw'
flac-1.5.0/src/libFLAC/metadata_object.c:1904:11: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/metadata_object.c:1909:9: branch_false: ...to here
flac-1.5.0/src/libFLAC/metadata_object.c:1910:9: throw: if 'FLAC__bitwriter_delete' throws an exception...
flac-1.5.0/src/libFLAC/metadata_object.c:1909:9: danger: 'malloc(max(bytes, 1))' leaks here; was allocated at [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12)
# 1907| }
# 1908|
# 1909|-> memcpy(output,buffer,bytes);
# 1910| FLAC__bitwriter_delete(bw);
# 1911| return output;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/stream_decoder.c:1804:58: warning[-Wanalyzer-malloc-leak]: leak of 'block.data.application.data'
flac-1.5.0/src/libFLAC/stream_decoder.c:3905:12: enter_function: entry to 'seek_to_absolute_sample_ogg_'
flac-1.5.0/src/libFLAC/stream_decoder.c:3928:11: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3931:17: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3932:23: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3951:17: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3954:19: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:28: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:29: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3963:25: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3965:29: call_function: calling 'FLAC__stream_decoder_process_until_end_of_metadata' from 'seek_to_absolute_sample_ogg_'
# 1802| ok = false;
# 1803| }
# 1804|-> else if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.application.data, real_length))
# 1805| ok = false; /* read_callback_ sets the state for us */
# 1806| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/stream_decoder.c:1832:58: warning[-Wanalyzer-malloc-leak]: leak of 'block.data.unknown.data'
flac-1.5.0/src/libFLAC/stream_decoder.c:3905:12: enter_function: entry to 'seek_to_absolute_sample_ogg_'
flac-1.5.0/src/libFLAC/stream_decoder.c:3928:11: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3931:17: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3932:23: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3951:17: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3954:19: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:28: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:29: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3963:25: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3965:29: call_function: calling 'FLAC__stream_decoder_process_until_end_of_metadata' from 'seek_to_absolute_sample_ogg_'
# 1830| ok = false;
# 1831| }
# 1832|-> else if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.unknown.data, real_length))
# 1833| ok = false; /* read_callback_ sets the state for us */
# 1834| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/stream_decoder.c:2049:22: warning[-Wanalyzer-malloc-leak]: leak of 'block.data.application.data'
flac-1.5.0/src/libFLAC/stream_decoder.c:3905:12: enter_function: entry to 'seek_to_absolute_sample_ogg_'
flac-1.5.0/src/libFLAC/stream_decoder.c:3928:11: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3931:17: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3932:23: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3951:17: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3954:19: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:28: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:29: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3963:25: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3965:29: call_function: calling 'FLAC__stream_decoder_process_until_end_of_metadata' from 'seek_to_absolute_sample_ogg_'
# 2047| return false;
# 2048| }
# 2049|-> if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->vendor_string.entry, obj->vendor_string.length))
# 2050| return false; /* read_callback_ sets the state for us */
# 2051| obj->vendor_string.entry[obj->vendor_string.length] = '\0';
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/stream_decoder.c:2098:33: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(size2)'
flac-1.5.0/src/libFLAC/stream_decoder.c:2026:12: enter_function: entry to 'read_metadata_vorbiscomment_'
flac-1.5.0/src/libFLAC/stream_decoder.c:2033:12: branch_true: following 'true' branch (when 'length > 7')...
flac-1.5.0/src/libFLAC/stream_decoder.c:2034:17: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2036:20: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2038:30: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2038:20: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2044:25: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2045:20: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2049:69: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2049:20: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2051:17: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2055:20: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2059:21: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2059:20: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2064:20: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2064:20: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2065:51: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2065:28: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2065:28: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2070:37: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2072:33: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2076:36: branch_false: following 'false' branch (when 'length > 3')...
flac-1.5.0/src/libFLAC/stream_decoder.c:2081:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2082:36: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2086:46: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2086:36: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2092:41: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2093:68: call_function: inlined call to 'safe_malloc_add_2op_' from 'read_metadata_vorbiscomment_'
flac-1.5.0/src/libFLAC/stream_decoder.c:2093:36: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:2098:33: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:2098:33: danger: 'malloc(size2)' leaks here; was allocated at [(30)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/29)
# 2096| return false;
# 2097| }
# 2098|-> memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
# 2099| if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
# 2100| /* Current i-th entry is bad, so we delete it. */
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/stream_decoder.c:2162:29: warning[-Wanalyzer-malloc-leak]: leak of 'block.data.cue_sheet.tracks'
flac-1.5.0/src/libFLAC/stream_decoder.c:3905:12: enter_function: entry to 'seek_to_absolute_sample_ogg_'
flac-1.5.0/src/libFLAC/stream_decoder.c:3928:11: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3931:17: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3932:23: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3951:17: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3954:19: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:28: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:29: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3963:25: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3965:29: call_function: calling 'FLAC__stream_decoder_process_until_end_of_metadata' from 'seek_to_absolute_sample_ogg_'
# 2160| for(i = 0; i < obj->num_tracks; i++) {
# 2161| FLAC__StreamMetadata_CueSheet_Track *track = &obj->tracks[i];
# 2162|-> if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &track->offset, FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN))
# 2163| return false; /* read_callback_ sets the state for us */
# 2164|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/stream_decoder.c:2242:21: warning[-Wanalyzer-malloc-leak]: leak of 'block.data.application.data'
flac-1.5.0/src/libFLAC/stream_decoder.c:3905:12: enter_function: entry to 'seek_to_absolute_sample_ogg_'
flac-1.5.0/src/libFLAC/stream_decoder.c:3928:11: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3931:17: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3932:23: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3951:17: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3954:19: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:28: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:29: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3963:25: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3965:29: call_function: calling 'FLAC__stream_decoder_process_until_end_of_metadata' from 'seek_to_absolute_sample_ogg_'
# 2240| }
# 2241| if(x > 0) {
# 2242|-> if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)obj->mime_type, x))
# 2243| return false; /* read_callback_ sets the state for us */
# 2244| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/libFLAC/stream_decoder.c:2248:13: warning[-Wanalyzer-malloc-leak]: leak of 'block.data.application.data'
flac-1.5.0/src/libFLAC/stream_decoder.c:3905:12: enter_function: entry to 'seek_to_absolute_sample_ogg_'
flac-1.5.0/src/libFLAC/stream_decoder.c:3928:11: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3931:17: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3932:23: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3951:17: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3954:19: branch_true: following 'true' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:28: branch_true: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3955:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:29: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3959:27: branch_false: following 'false' branch...
flac-1.5.0/src/libFLAC/stream_decoder.c:3963:25: branch_false: ...to here
flac-1.5.0/src/libFLAC/stream_decoder.c:3965:29: call_function: calling 'FLAC__stream_decoder_process_until_end_of_metadata' from 'seek_to_absolute_sample_ogg_'
# 2246|
# 2247| /* read description */
# 2248|-> if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN))
# 2249| return false; /* read_callback_ sets the state for us */
# 2250| if(FLAC__bitreader_limit_remaining(decoder->private_->input) < x){
Error: CPPCHECK_WARNING (CWE-190):
flac-1.5.0/src/libFLAC/stream_encoder.c:2518: error[integerOverflow]: Signed integer overflow for expression '-2147483647-1'.
# 2516| const uint32_t channels = encoder->protected_->channels, blocksize = encoder->protected_->blocksize;
# 2517| const FLAC__int32 sample_max = INT32_MAX >> (32 - encoder->protected_->bits_per_sample);
# 2518|-> const FLAC__int32 sample_min = INT32_MIN >> (32 - encoder->protected_->bits_per_sample);
# 2519|
# 2520| FLAC__ASSERT(0 != encoder);
Error: CPPCHECK_WARNING (CWE-190):
flac-1.5.0/src/libFLAC/stream_encoder.c:2569: error[integerOverflow]: Signed integer overflow for expression '-2147483647-1'.
# 2567| const uint32_t channels = encoder->protected_->channels, blocksize = encoder->protected_->blocksize;
# 2568| const FLAC__int32 sample_max = INT32_MAX >> (32 - encoder->protected_->bits_per_sample);
# 2569|-> const FLAC__int32 sample_min = INT32_MIN >> (32 - encoder->protected_->bits_per_sample);
# 2570|
# 2571| FLAC__ASSERT(0 != encoder);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/metaflac/operations.c:290:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)(buffer_size + 4))’
flac-1.5.0/src/metaflac/operations.c:235:12: enter_function: entry to ‘do_major_operation__append’
flac-1.5.0/src/metaflac/operations.c:284:15: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations.c:286:46: branch_true: ...to here
flac-1.5.0/src/metaflac/operations.c:287:26: call_function: inlined call to ‘safe_malloc_’ from ‘do_major_operation__append’
flac-1.5.0/src/metaflac/operations.c:288:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations.c:290:17: branch_false: ...to here
flac-1.5.0/src/metaflac/operations.c:294:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations.c:301:30: branch_false: ...to here
flac-1.5.0/src/metaflac/operations.c:301:30: throw: if ‘FLAC__metadata_object_set_raw’ throws an exception...
flac-1.5.0/src/metaflac/operations.c:290:17: danger: ‘malloc((long unsigned int)(buffer_size + 4))’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 288| if(0 == buffer)
# 289| die("out of memory allocating read buffer");
# 290|-> memcpy(buffer, header, FLAC__STREAM_METADATA_HEADER_LENGTH);
# 291|
# 292| num_objects++;
Error: GCC_ANALYZER_WARNING (CWE-476):
flac-1.5.0/src/metaflac/operations.c:290:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘malloc((long unsigned int)(buffer_size + 4))’
flac-1.5.0/src/metaflac/operations.c:235:12: enter_function: entry to ‘do_major_operation__append’
flac-1.5.0/src/metaflac/operations.c:284:15: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations.c:286:46: branch_true: ...to here
flac-1.5.0/src/metaflac/operations.c:287:26: call_function: inlined call to ‘safe_malloc_’ from ‘do_major_operation__append’
flac-1.5.0/src/metaflac/operations.c:288:19: release_memory: assuming ‘malloc((long unsigned int)(buffer_size + 4))’ is NULL
flac-1.5.0/src/metaflac/operations.c:288:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations.c:289:25: branch_true: ...to here
flac-1.5.0/src/metaflac/operations.c:290:17: danger: dereference of NULL ‘malloc((long unsigned int)(buffer_size + 4))’
# 288| if(0 == buffer)
# 289| die("out of memory allocating read buffer");
# 290|-> memcpy(buffer, header, FLAC__STREAM_METADATA_HEADER_LENGTH);
# 291|
# 292| num_objects++;
Error: GCC_ANALYZER_WARNING (CWE-688):
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:266:20: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:242:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:246:69: branch_true: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:247:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:251:19: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:251:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:40: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:33: acquire_memory: allocated here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:19: release_memory: assuming ‘data’ is NULL
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:19: branch_true: following ‘true’ branch (when ‘data’ is NULL)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:256:25: branch_true: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:258:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:266:20: danger: argument 1 (‘data’) NULL where non-null expected
# 264| }
# 265| fclose(f);
# 266|-> if(strlen(data) != (size_t)size) {
# 267| free(data);
# 268| flac_fprintf(stderr, "%s: ERROR: file '%s' for '%s' tag value has embedded NULs\n", filename, field->field_value, field->field_name);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:276:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:242:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:246:69: branch_true: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:247:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:251:19: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:251:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:40: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:33: acquire_memory: allocated here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:19: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:257:21: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:258:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:266:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:273:19: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:273:19: branch_false: following ‘false’ branch (when ‘raw == 0’)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:276:25: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:276:25: throw: if ‘utf8_encode’ throws an exception...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:276:25: danger: ‘data’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 274| converted = data;
# 275| }
# 276|-> else if(utf8_encode(data, &converted) >= 0) {
# 277| free(data);
# 278| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:286:21: warning[-Wanalyzer-malloc-leak]: leak of ‘converted’
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:242:11: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:246:69: branch_true: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:247:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:251:19: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:251:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:40: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:33: acquire_memory: allocated here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:255:19: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:257:21: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:258:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:266:19: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:273:19: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:273:19: branch_true: following ‘true’ branch (when ‘raw != 0’)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:274:25: branch_true: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:286:21: throw: if ‘FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair’ throws an exception...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:286:21: danger: ‘converted’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 284|
# 285| /* create and entry and append it */
# 286|-> if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, field->field_name, converted)) {
# 287| free(converted);
# 288| flac_fprintf(stderr, "%s: ERROR: file '%s' for '%s' tag value is not valid UTF-8\n", filename, field->field_value, field->field_name);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:374:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:346:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:350:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:353:21: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:353:21: acquire_resource: opened here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:355:11: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:355:11: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:361:15: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:362:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:363:35: branch_true: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:364:27: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:371:33: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:374:37: throw: if ‘parse_vorbis_comment_field’ throws an exception...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:374:37: danger: ‘f’ leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 372| memset(&field, 0, sizeof(Argument_VcField));
# 373| field.field_value_from_file = false;
# 374|-> if(!parse_vorbis_comment_field(line, &field.field, &field.field_name, &field.field_value, &field.field_value_length, &violation)) {
# 375| FLAC__ASSERT(0 != violation);
# 376| flac_fprintf(stderr, "%s: ERROR: malformed vorbis comment field \"%s\",\n %s\n", vc_filename->value, line, violation);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:374:37: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:346:11: branch_false: following ‘false’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:350:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:353:21: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:353:21: acquire_memory: allocated here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:355:11: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:355:11: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:361:15: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:362:19: branch_true: following ‘true’ branch...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:363:35: branch_true: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:364:27: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:371:33: branch_false: ...to here
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:374:37: throw: if ‘parse_vorbis_comment_field’ throws an exception...
flac-1.5.0/src/metaflac/operations_shorthand_vorbiscomment.c:374:37: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 372| memset(&field, 0, sizeof(Argument_VcField));
# 373| field.field_value_from_file = false;
# 374|-> if(!parse_vorbis_comment_field(line, &field.field, &field.field_name, &field.field_value, &field.field_value_length, &violation)) {
# 375| FLAC__ASSERT(0 != violation);
# 376| flac_fprintf(stderr, "%s: ERROR: malformed vorbis comment field \"%s\",\n %s\n", vc_filename->value, line, violation);
Error: COMPILER_WARNING (CWE-704):
flac-1.5.0/src/share/getopt/getopt.c: scope_hint: In function 'share___getopt_internal'
flac-1.5.0/src/share/getopt/getopt.c:781:18: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 781 | char *temp = my_index (optstring, c);
# | ^~~~~~~~
# 779| {
# 780| char c = *nextchar++;
# 781|-> char *temp = my_index (optstring, c);
# 782|
# 783| /* Increment `share__optind' when we start to process its last character. */
Error: COMPILER_WARNING (CWE-704):
flac-1.5.0/src/share/getopt/getopt.c:781:18: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 779| {
# 780| char c = *nextchar++;
# 781|-> char *temp = my_index (optstring, c);
# 782|
# 783| /* Increment `share__optind' when we start to process its last character. */
Error: GCC_ANALYZER_WARNING (CWE-476):
flac-1.5.0/src/share/getopt/getopt.c:849:46: warning[-Wanalyzer-null-dereference]: dereference of NULL 'p'
flac-1.5.0/src/share/getopt/getopt.c:977:1: enter_function: entry to 'share__getopt'
flac-1.5.0/src/share/getopt/getopt.c:979:10: call_function: calling 'share___getopt_internal' from 'share__getopt'
# 847| /* Test all long options for either exact match
# 848| or abbreviated matches. */
# 849|-> for (p = longopts, option_index = 0; p->name; p++, option_index++)
# 850| if (!strncmp (p->name, nextchar, nameend - nextchar))
# 851| {
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/grabbag/picture.c:313:14: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)grabbag__file_get_filesize(filepath))'
flac-1.5.0/src/share/grabbag/picture.c:328:23: enter_function: entry to 'grabbag__picture_parse_specification'
flac-1.5.0/src/share/grabbag/picture.c:337:11: branch_false: following 'false' branch (when 'spec' is non-NULL)...
flac-1.5.0/src/share/grabbag/picture.c:339:11: branch_false: ...to here
flac-1.5.0/src/share/grabbag/picture.c:339:11: branch_false: following 'false' branch (when 'error_message' is non-NULL)...
flac-1.5.0/src/share/grabbag/picture.c:342:9: branch_false: ...to here
flac-1.5.0/src/share/grabbag/picture.c:344:11: branch_false: following 'false' branch...
flac-1.5.0/src/share/grabbag/picture.c:349:12: branch_false: ...to here
flac-1.5.0/src/share/grabbag/picture.c:349:11: branch_false: following 'false' branch...
flac-1.5.0/src/share/grabbag/picture.c:390:21: call_function: inlined call to 'local__parse_type_' from 'grabbag__picture_parse_specification'
flac-1.5.0/src/share/grabbag/picture.c:402:11: branch_true: following 'true' branch...
flac-1.5.0/src/share/grabbag/picture.c:403:19: branch_true: ...to here
flac-1.5.0/src/share/grabbag/picture.c:403:19: branch_false: following 'false' branch (when 'state == 4')...
flac-1.5.0/src/share/grabbag/picture.c:406:40: branch_false: ...to here
flac-1.5.0/src/share/grabbag/picture.c:406:27: branch_false: following 'false' branch (when the strings are non-equal)...
flac-1.5.0/src/share/grabbag/picture.c:415:50: branch_false: ...to here
flac-1.5.0/src/share/grabbag/picture.c:415:50: call_function: calling 'read_file' from 'grabbag__picture_parse_specification'
# 311| fclose(file);
# 312|
# 313|-> if (!FLAC__metadata_object_picture_set_data(obj, buffer, (FLAC__uint32)size, /*copy=*/false))
# 314| error_message = error_messages[6];
# 315| /* try to extract MIME type if user left it blank */
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/grabbag/replaygain.c:113:9: warning[-Wanalyzer-malloc-leak]: leak of 'saved_locale'
flac-1.5.0/src/share/grabbag/replaygain.c:109:24: acquire_memory: allocated here
flac-1.5.0/src/share/grabbag/replaygain.c:110:12: branch_false: following 'false' branch (when 'saved_locale' is non-NULL)...
flac-1.5.0/src/share/grabbag/replaygain.c:112:9: branch_false: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:113:9: throw: if 'flac_snprintf' throws an exception...
flac-1.5.0/src/share/grabbag/replaygain.c:113:9: danger: 'saved_locale' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 111| return false;
# 112| setlocale(LC_ALL, "C");
# 113|-> flac_snprintf(buffer, sizeof(buffer), format, name, value);
# 114| setlocale(LC_ALL, saved_locale);
# 115| free(saved_locale);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/grabbag/replaygain.c:632:37: warning[-Wanalyzer-malloc-leak]: leak of 'saved_locale'
flac-1.5.0/src/share/grabbag/replaygain.c:627:24: acquire_memory: allocated here
flac-1.5.0/src/share/grabbag/replaygain.c:628:12: branch_false: following 'false' branch (when 'saved_locale' is non-NULL)...
flac-1.5.0/src/share/grabbag/replaygain.c:630:9: branch_false: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:632:37: throw: if 'FLAC__metadata_object_vorbiscomment_find_entry_from' throws an exception...
flac-1.5.0/src/share/grabbag/replaygain.c:632:37: danger: 'saved_locale' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 630| setlocale(LC_ALL, "C");
# 631|
# 632|-> if(0 <= (reference_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)GRABBAG__REPLAYGAIN_TAG_REFERENCE_LOUDNESS)))
# 633| (void)parse_double_(block->data.vorbis_comment.comments + reference_offset, reference);
# 634|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: warning[-Wanalyzer-malloc-leak]: leak of 'saved_locale'
flac-1.5.0/src/share/grabbag/replaygain.c:627:24: acquire_memory: allocated here
flac-1.5.0/src/share/grabbag/replaygain.c:628:12: branch_false: following 'false' branch (when 'saved_locale' is non-NULL)...
flac-1.5.0/src/share/grabbag/replaygain.c:630:9: branch_false: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:632:11: branch_false: following 'false' branch...
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: branch_false: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: branch_true: following 'true' branch (when 'album_mode != 0')...
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: branch_true: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: throw: if 'FLAC__metadata_object_vorbiscomment_find_entry_from' throws an exception...
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: danger: 'saved_locale' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 633| (void)parse_double_(block->data.vorbis_comment.comments + reference_offset, reference);
# 634|
# 635|-> if(0 > (gain_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)(album_mode? GRABBAG__REPLAYGAIN_TAG_ALBUM_GAIN : GRABBAG__REPLAYGAIN_TAG_TITLE_GAIN))))
# 636| res = false;
# 637| if(0 > (peak_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)(album_mode? GRABBAG__REPLAYGAIN_TAG_ALBUM_PEAK : GRABBAG__REPLAYGAIN_TAG_TITLE_PEAK))))
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/grabbag/replaygain.c:637:31: warning[-Wanalyzer-malloc-leak]: leak of 'saved_locale'
flac-1.5.0/src/share/grabbag/replaygain.c:627:24: acquire_memory: allocated here
flac-1.5.0/src/share/grabbag/replaygain.c:628:12: branch_false: following 'false' branch (when 'saved_locale' is non-NULL)...
flac-1.5.0/src/share/grabbag/replaygain.c:630:9: branch_false: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:632:11: branch_false: following 'false' branch...
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: branch_false: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:635:31: branch_true: following 'true' branch...
flac-1.5.0/src/share/grabbag/replaygain.c:637:31: branch_true: following 'true' branch (when 'album_mode != 0')...
flac-1.5.0/src/share/grabbag/replaygain.c:637:31: branch_true: ...to here
flac-1.5.0/src/share/grabbag/replaygain.c:637:31: throw: if 'FLAC__metadata_object_vorbiscomment_find_entry_from' throws an exception...
flac-1.5.0/src/share/grabbag/replaygain.c:637:31: danger: 'saved_locale' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 635| if(0 > (gain_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)(album_mode? GRABBAG__REPLAYGAIN_TAG_ALBUM_GAIN : GRABBAG__REPLAYGAIN_TAG_TITLE_GAIN))))
# 636| res = false;
# 637|-> if(0 > (peak_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)(album_mode? GRABBAG__REPLAYGAIN_TAG_ALBUM_PEAK : GRABBAG__REPLAYGAIN_TAG_TITLE_PEAK))))
# 638| res = false;
# 639|
Error: COMPILER_WARNING:
flac-1.5.0/src/share/grabbag/seektable.c: scope_hint: In function 'grabbag__seektable_convert_specification_to_template'
flac-1.5.0/src/share/grabbag/seektable.c:32:18: warning[-Wunused-but-set-variable=]: variable 'i' set but not used
# 32 | uint32_t i;
# | ^
# 30| FLAC__bool grabbag__seektable_convert_specification_to_template(const char *spec, FLAC__bool only_explicit_placeholders, FLAC__uint64 total_samples_to_encode, uint32_t sample_rate, FLAC__StreamMetadata *seektable_template, FLAC__bool *spec_has_real_points)
# 31| {
# 32|-> uint32_t i;
# 33| const char *pt;
# 34|
Error: GCC_ANALYZER_WARNING (CWE-476):
flac-1.5.0/src/share/grabbag/seektable.c:51:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'q'
flac-1.5.0/src/share/grabbag/seektable.c:42:31: branch_true: following 'true' branch...
flac-1.5.0/src/share/grabbag/seektable.c:46:19: branch_true: following 'true' branch (when 'pt < q')...
flac-1.5.0/src/share/grabbag/seektable.c:47:33: branch_true: ...to here
flac-1.5.0/src/share/grabbag/seektable.c:47:27: branch_false: following 'false' branch...
flac-1.5.0/src/share/grabbag/seektable.c:51:33: branch_false: ...to here
flac-1.5.0/src/share/grabbag/seektable.c:51:33: danger: dereference of NULL 'q'
# 49| return false;
# 50| }
# 51|-> else if(q[-1] == 'x') { /* -S #x */
# 52| if(total_samples_to_encode > 0) { /* we can only do these if we know the number of samples to encode up front */
# 53| if(0 != spec_has_real_points)
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:69:6: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open("UTF-8", fromcode)'
flac-1.5.0/src/share/utf8/iconvert.c:68:9: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:69:6: danger: 'iconv_open("UTF-8", fromcode)' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 67|
# 68| cd1 = iconv_open("UTF-8", fromcode);
# 69|-> if (cd1 == (iconv_t)(-1))
# 70| return -1;
# 71|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:74:8: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open("UTF-8", fromcode)'
flac-1.5.0/src/share/utf8/iconvert.c:68:9: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: throw: if 'iconv_open' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: danger: 'iconv_open("UTF-8", fromcode)' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 72| cd2 = (iconv_t)(-1);
# 73| /* Don't use strcasecmp() as it's locale-dependent. */
# 74|-> if (!strchr("Uu", tocode[0]) ||
# 75| !strchr("Tt", tocode[1]) ||
# 76| !strchr("Ff", tocode[2]) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:93:5: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(tocode1, "UTF-8")'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:93:5: danger: 'iconv_open(tocode1, "UTF-8")' leaks here; was allocated at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
# 91|
# 92| cd2 = iconv_open(tocode1, "UTF-8");
# 93|-> free(tocode1);
# 94|
# 95| if (cd2 == (iconv_t)(-1))
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:98:8: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(tocode, fromcode)'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:96:13: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:96:13: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:98:8: danger: 'iconv_open(tocode, fromcode)' leaks here; was allocated at [(10)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/9)
# 96| cd2 = iconv_open(tocode, fromcode);
# 97|
# 98|-> if (cd2 == (iconv_t)(-1)) {
# 99| iconv_close(cd1);
# 100| return -1;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:115:9: warning[-Wanalyzer-malloc-leak]: leak of 'cd2'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_false: following 'false' branch (when 'utfbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:110:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:115:9: throw: if 'iconv' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:115:9: danger: 'cd2' leaks here; was allocated at [(8)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/7)
# 113| obl = utflen;
# 114| for (;;) {
# 115|-> k = iconv(cd1, &ib, &ibl, &ob, &obl);
# 116| assert((!k && !ibl) ||
# 117| (k == (size_t)(-1) && errno == E2BIG && ibl && obl < 6) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:115:9: warning[-Wanalyzer-malloc-leak]: leak of 'ob'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:105:12: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_false: following 'false' branch (when 'utfbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:110:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:115:9: throw: if 'iconv' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:115:9: danger: 'ob' leaks here; was allocated at [(10)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/9)
# 113| obl = utflen;
# 114| for (;;) {
# 115|-> k = iconv(cd1, &ib, &ibl, &ob, &obl);
# 116| assert((!k && !ibl) ||
# 117| (k == (size_t)(-1) && errno == E2BIG && ibl && obl < 6) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:140:7: warning[-Wanalyzer-malloc-leak]: leak of 'cd2'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_false: following 'false' branch (when 'utfbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:110:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:120:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:122:9: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:122:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:137:7: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:140:7: throw: if 'iconv' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:140:7: danger: 'cd2' leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
# 138| *ob++ = '#', obl--;
# 139| ret = 2;
# 140|-> iconv(cd1, 0, 0, 0, 0);
# 141| }
# 142| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:179:9: warning[-Wanalyzer-malloc-leak]: leak of 'cd2'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_false: following 'false' branch (when 'utfbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:110:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:120:8: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_false: following 'false' branch (when 'cd2 != 18446744073709551615')...
flac-1.5.0/src/share/utf8/iconvert.c:164:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:165:6: branch_false: following 'false' branch (when 'utflen != 0')...
flac-1.5.0/src/share/utf8/iconvert.c:167:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:168:6: branch_false: following 'false' branch (when 'newbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:174:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:176:10: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:177:5: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:179:9: throw: if 'iconv' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:179:9: danger: 'cd2' leaks here; was allocated at [(8)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/7)
# 177| ob = tbuf;
# 178| obl = sizeof(tbuf);
# 179|-> k = iconv(cd2, &ib, &ibl, &ob, &obl);
# 180| assert((k != (size_t)(-1) && !ibl) ||
# 181| (k == (size_t)(-1) && errno == E2BIG && ibl) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:179:9: warning[-Wanalyzer-malloc-leak]: leak of 'ib'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_false: following 'false' branch (when 'utfbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:110:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:120:8: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_false: following 'false' branch (when 'cd2 != 18446744073709551615')...
flac-1.5.0/src/share/utf8/iconvert.c:164:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:165:6: branch_false: following 'false' branch (when 'utflen != 0')...
flac-1.5.0/src/share/utf8/iconvert.c:167:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:168:6: branch_false: following 'false' branch (when 'newbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:174:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:176:10: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:177:5: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:179:9: throw: if 'iconv' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:179:9: danger: 'ib' leaks here; was allocated at [(18)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/17)
# 177| ob = tbuf;
# 178| obl = sizeof(tbuf);
# 179|-> k = iconv(cd2, &ib, &ibl, &ob, &obl);
# 180| assert((k != (size_t)(-1) && !ibl) ||
# 181| (k == (size_t)(-1) && errno == E2BIG && ibl) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:201:7: warning[-Wanalyzer-malloc-leak]: leak of 'cd2'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_false: following 'false' branch (when 'utfbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:110:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:120:8: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_false: following 'false' branch (when 'cd2 != 18446744073709551615')...
flac-1.5.0/src/share/utf8/iconvert.c:164:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:165:6: branch_false: following 'false' branch (when 'utflen != 0')...
flac-1.5.0/src/share/utf8/iconvert.c:167:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:168:6: branch_false: following 'false' branch (when 'newbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:174:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:176:10: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:199:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:201:7: throw: if 'iconv' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:201:7: danger: 'cd2' leaks here; was allocated at [(8)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/7)
# 199| ob = tbuf;
# 200| obl = sizeof(tbuf);
# 201|-> k = iconv(cd2, 0, 0, &ob, &obl);
# 202| assert(!k);
# 203| outlen += ob - tbuf;
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:214:9: warning[-Wanalyzer-malloc-leak]: leak of 'ob'
flac-1.5.0/src/share/utf8/iconvert.c:56:5: enter_function: entry to 'iconvert'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_false: following 'false' branch (when 'utfbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:110:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:120:8: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:144:6: branch_false: following 'false' branch (when 'cd2 != 18446744073709551615')...
flac-1.5.0/src/share/utf8/iconvert.c:164:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:165:6: branch_false: following 'false' branch (when 'utflen != 0')...
flac-1.5.0/src/share/utf8/iconvert.c:167:12: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:168:6: branch_false: following 'false' branch (when 'newbuf' is non-NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:174:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:176:10: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:177:5: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:176:10: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:199:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:206:12: call_function: inlined call to 'safe_malloc_add_2op_' from 'iconvert'
flac-1.5.0/src/share/utf8/iconvert.c:207:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:209:3: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:213:10: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:214:9: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:214:9: throw: if 'iconv' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:214:9: danger: 'ob' leaks here; was allocated at [(28)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/27)
# 212| obl = outlen;
# 213| while (ibl) {
# 214|-> k = iconv(cd2, &ib, &ibl, &ob, &obl);
# 215| assert((k != (size_t)(-1) && !ibl) ||
# 216| (k == (size_t)(-1) && errno == EILSEQ && ibl));
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:251:3: warning[-Wanalyzer-malloc-leak]: leak of 'cd2'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_true: following 'true' branch (when 'utfbuf' is NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:107:5: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:251:3: throw: if 'iconv_close' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:251:3: danger: 'cd2' leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7)
# 249| if(0 != utfbuf)
# 250| free(utfbuf);
# 251|-> iconv_close(cd1);
# 252| if (cd2 != (iconv_t)(-1))
# 253| iconv_close(cd2);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/share/utf8/iconvert.c:253:5: warning[-Wanalyzer-malloc-leak]: leak of 'cd2'
flac-1.5.0/src/share/utf8/iconvert.c:69:6: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:74:8: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:74:6: branch_true: following 'true' branch...
flac-1.5.0/src/share/utf8/iconvert.c:88:10: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:89:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:92:11: acquire_memory: allocated here
flac-1.5.0/src/share/utf8/iconvert.c:95:8: branch_false: following 'false' branch...
flac-1.5.0/src/share/utf8/iconvert.c:255:1: branch_false: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:106:6: branch_true: following 'true' branch (when 'utfbuf' is NULL)...
flac-1.5.0/src/share/utf8/iconvert.c:107:5: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:252:6: branch_true: following 'true' branch (when 'cd2 != 18446744073709551615')...
flac-1.5.0/src/share/utf8/iconvert.c:253:5: branch_true: ...to here
flac-1.5.0/src/share/utf8/iconvert.c:253:5: throw: if 'iconv_close' throws an exception...
flac-1.5.0/src/share/utf8/iconvert.c:253:5: danger: 'cd2' leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
# 251| iconv_close(cd1);
# 252| if (cd2 != (iconv_t)(-1))
# 253|-> iconv_close(cd2);
# 254| return -2;
# 255| }
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: throw: if 'FLAC__stream_encoder_new' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 86| return false;
# 87|
# 88|-> encoder = FLAC__stream_encoder_new();
# 89| if(0 == encoder) {
# 90| fclose(encoder_client_data.file);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: throw: if 'FLAC__stream_encoder_new' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 86| return false;
# 87|
# 88|-> encoder = FLAC__stream_encoder_new();
# 89| if(0 == encoder) {
# 90| fclose(encoder_client_data.file);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: throw: if 'FLAC__stream_encoder_set_ogg_serial_number' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 92| }
# 93|
# 94|-> FLAC__stream_encoder_set_ogg_serial_number(encoder, file_utils__ogg_serial_number);
# 95| FLAC__stream_encoder_set_verify(encoder, true);
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: throw: if 'FLAC__stream_encoder_set_ogg_serial_number' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 92| }
# 93|
# 94|-> FLAC__stream_encoder_set_ogg_serial_number(encoder, file_utils__ogg_serial_number);
# 95| FLAC__stream_encoder_set_verify(encoder, true);
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:95:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:95:9: throw: if 'FLAC__stream_encoder_set_verify' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:95:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 93|
# 94| FLAC__stream_encoder_set_ogg_serial_number(encoder, file_utils__ogg_serial_number);
# 95|-> FLAC__stream_encoder_set_verify(encoder, true);
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:95:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:95:9: throw: if 'FLAC__stream_encoder_set_verify' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:95:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 93|
# 94| FLAC__stream_encoder_set_ogg_serial_number(encoder, file_utils__ogg_serial_number);
# 95|-> FLAC__stream_encoder_set_verify(encoder, true);
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:96:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:96:9: throw: if 'FLAC__stream_encoder_set_streamable_subset' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:96:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 94| FLAC__stream_encoder_set_ogg_serial_number(encoder, file_utils__ogg_serial_number);
# 95| FLAC__stream_encoder_set_verify(encoder, true);
# 96|-> FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:96:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:96:9: throw: if 'FLAC__stream_encoder_set_streamable_subset' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:96:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 94| FLAC__stream_encoder_set_ogg_serial_number(encoder, file_utils__ogg_serial_number);
# 95| FLAC__stream_encoder_set_verify(encoder, true);
# 96|-> FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:97:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:97:9: throw: if 'FLAC__stream_encoder_set_do_mid_side_stereo' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:97:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 95| FLAC__stream_encoder_set_verify(encoder, true);
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97|-> FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:97:9: throw: if 'FLAC__stream_encoder_set_do_mid_side_stereo' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:97:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 95| FLAC__stream_encoder_set_verify(encoder, true);
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97|-> FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:98:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:98:9: throw: if 'FLAC__stream_encoder_set_loose_mid_side_stereo' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:98:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98|-> FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:98:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:98:9: throw: if 'FLAC__stream_encoder_set_loose_mid_side_stereo' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:98:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 96| FLAC__stream_encoder_set_streamable_subset(encoder, true);
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98|-> FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:99:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:99:9: throw: if 'FLAC__stream_encoder_set_channels' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:99:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99|-> FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:99:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:99:9: throw: if 'FLAC__stream_encoder_set_channels' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:99:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 97| FLAC__stream_encoder_set_do_mid_side_stereo(encoder, false);
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99|-> FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:100:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:100:9: throw: if 'FLAC__stream_encoder_set_bits_per_sample' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:100:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100|-> FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:100:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:100:9: throw: if 'FLAC__stream_encoder_set_bits_per_sample' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:100:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 98| FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, false);
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100|-> FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:101:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:101:9: throw: if 'FLAC__stream_encoder_set_sample_rate' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:101:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101|-> FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:101:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:101:9: throw: if 'FLAC__stream_encoder_set_sample_rate' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:101:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 99| FLAC__stream_encoder_set_channels(encoder, streaminfo->data.stream_info.channels);
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101|-> FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:102:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:102:9: throw: if 'FLAC__stream_encoder_set_blocksize' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:102:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102|-> FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:102:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:102:9: throw: if 'FLAC__stream_encoder_set_blocksize' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:102:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 100| FLAC__stream_encoder_set_bits_per_sample(encoder, streaminfo->data.stream_info.bits_per_sample);
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102|-> FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:103:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:103:9: throw: if 'FLAC__stream_encoder_set_max_lpc_order' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:103:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103|-> FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:103:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:103:9: throw: if 'FLAC__stream_encoder_set_max_lpc_order' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:103:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 101| FLAC__stream_encoder_set_sample_rate(encoder, streaminfo->data.stream_info.sample_rate);
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103|-> FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:104:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:104:9: throw: if 'FLAC__stream_encoder_set_qlp_coeff_precision' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:104:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104|-> FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:104:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:104:9: throw: if 'FLAC__stream_encoder_set_qlp_coeff_precision' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:104:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
# 102| FLAC__stream_encoder_set_blocksize(encoder, streaminfo->data.stream_info.min_blocksize);
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104|-> FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:105:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:105:9: throw: if 'FLAC__stream_encoder_set_do_qlp_coeff_prec_search' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:105:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105|-> FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:105:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:105:9: throw: if 'FLAC__stream_encoder_set_do_qlp_coeff_prec_search' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:105:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 103| FLAC__stream_encoder_set_max_lpc_order(encoder, 0);
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105|-> FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:106:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:106:9: throw: if 'FLAC__stream_encoder_set_do_escape_coding' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:106:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106|-> FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:106:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:106:9: throw: if 'FLAC__stream_encoder_set_do_escape_coding' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:106:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
# 104| FLAC__stream_encoder_set_qlp_coeff_precision(encoder, 0);
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106|-> FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:107:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:107:9: throw: if 'FLAC__stream_encoder_set_do_exhaustive_model_search' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:107:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107|-> FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:107:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:107:9: throw: if 'FLAC__stream_encoder_set_do_exhaustive_model_search' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:107:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
# 105| FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107|-> FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:108:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:108:9: throw: if 'FLAC__stream_encoder_set_min_residual_partition_order' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:108:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108|-> FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:108:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:108:9: throw: if 'FLAC__stream_encoder_set_min_residual_partition_order' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:108:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
# 106| FLAC__stream_encoder_set_do_escape_coding(encoder, false);
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108|-> FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:109:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:109:9: throw: if 'FLAC__stream_encoder_set_max_residual_partition_order' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:109:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109|-> FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111| FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:109:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:109:9: throw: if 'FLAC__stream_encoder_set_max_residual_partition_order' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:109:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 107| FLAC__stream_encoder_set_do_exhaustive_model_search(encoder, false);
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109|-> FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111| FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:110:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:110:9: throw: if 'FLAC__stream_encoder_set_rice_parameter_search_dist' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:110:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110|-> FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111| FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
# 112| FLAC__stream_encoder_set_metadata(encoder, metadata, num_metadata);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:110:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:110:9: throw: if 'FLAC__stream_encoder_set_rice_parameter_search_dist' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:110:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
# 108| FLAC__stream_encoder_set_min_residual_partition_order(encoder, 0);
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110|-> FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111| FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
# 112| FLAC__stream_encoder_set_metadata(encoder, metadata, num_metadata);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:111:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:111:9: throw: if 'FLAC__stream_encoder_set_total_samples_estimate' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:111:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111|-> FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
# 112| FLAC__stream_encoder_set_metadata(encoder, metadata, num_metadata);
# 113|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:111:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:111:9: throw: if 'FLAC__stream_encoder_set_total_samples_estimate' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:111:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/0)
# 109| FLAC__stream_encoder_set_max_residual_partition_order(encoder, 0);
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111|-> FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
# 112| FLAC__stream_encoder_set_metadata(encoder, metadata, num_metadata);
# 113|
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:112:9: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:112:9: throw: if 'FLAC__stream_encoder_set_metadata' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:112:9: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111| FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
# 112|-> FLAC__stream_encoder_set_metadata(encoder, metadata, num_metadata);
# 113|
# 114| if(is_ogg)
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:112:9: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:112:9: throw: if 'FLAC__stream_encoder_set_metadata' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:112:9: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/0)
# 110| FLAC__stream_encoder_set_rice_parameter_search_dist(encoder, 0);
# 111| FLAC__stream_encoder_set_total_samples_estimate(encoder, streaminfo->data.stream_info.total_samples);
# 112|-> FLAC__stream_encoder_set_metadata(encoder, metadata, num_metadata);
# 113|
# 114| if(is_ogg)
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:114:11: branch_true: following 'true' branch (when 'is_ogg != 0')...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: branch_true: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: throw: if 'FLAC__stream_encoder_init_ogg_stream' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/0)
# 113|
# 114| if(is_ogg)
# 115|-> init_status = FLAC__stream_encoder_init_ogg_stream(encoder, /*read_callback=*/0, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
# 116| else
# 117| init_status = FLAC__stream_encoder_init_stream(encoder, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:114:11: branch_true: following 'true' branch (when 'is_ogg != 0')...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: branch_true: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: throw: if 'FLAC__stream_encoder_init_ogg_stream' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:115:31: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/0)
# 113|
# 114| if(is_ogg)
# 115|-> init_status = FLAC__stream_encoder_init_ogg_stream(encoder, /*read_callback=*/0, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
# 116| else
# 117| init_status = FLAC__stream_encoder_init_stream(encoder, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: warning[-Wanalyzer-file-leak]: leak of FILE 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:114:11: branch_false: following 'false' branch (when 'is_ogg == 0')...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: throw: if 'FLAC__stream_encoder_init_stream' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: danger: 'encoder_client_data.file' leaks here; was opened at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
# 115| init_status = FLAC__stream_encoder_init_ogg_stream(encoder, /*read_callback=*/0, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
# 116| else
# 117|-> init_status = FLAC__stream_encoder_init_stream(encoder, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
# 118|
# 119| if(init_status != FLAC__STREAM_ENCODER_INIT_STATUS_OK) {
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: warning[-Wanalyzer-malloc-leak]: leak of 'encoder_client_data.file'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:45: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:85:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:88:19: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:89:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:94:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:114:11: branch_false: following 'false' branch (when 'is_ogg == 0')...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: throw: if 'FLAC__stream_encoder_init_stream' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:117:31: danger: 'encoder_client_data.file' leaks here; was allocated at [(1)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/0)
# 115| init_status = FLAC__stream_encoder_init_ogg_stream(encoder, /*read_callback=*/0, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
# 116| else
# 117|-> init_status = FLAC__stream_encoder_init_stream(encoder, encoder_write_callback_, /*seek_callback=*/0, /*tell_callback=*/0, encoder_metadata_callback_, &encoder_client_data);
# 118|
# 119| if(init_status != FLAC__STREAM_ENCODER_INIT_STATUS_OK) {
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(output_filename, "ab")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:27: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: danger: 'fopen(output_filename, "ab")' leaks here; was opened at [(1)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/0)
# 161| if(0 == (output = flac_fopen(output_filename, "ab")))
# 162| return false;
# 163|-> if(0 == (input = flac_fopen(input_filename, "rb")))
# 164| return false;
# 165|
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(output_filename, "ab")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:27: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: danger: 'fopen(output_filename, "ab")' leaks here; was allocated at [(1)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/0)
# 161| if(0 == (output = flac_fopen(output_filename, "ab")))
# 162| return false;
# 163|-> if(0 == (input = flac_fopen(input_filename, "rb")))
# 164| return false;
# 165|
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(input_filename, "rb")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: throw: if 'fseek' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: danger: 'fopen(input_filename, "rb")' leaks here; was opened at [(3)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/2)
# 164| return false;
# 165|
# 166|-> fseek(output, 0, SEEK_END);
# 167|
# 168| while ((c = fgetc(input)) != EOF) {
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(output_filename, "ab")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:27: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: throw: if 'fseek' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: danger: 'fopen(output_filename, "ab")' leaks here; was opened at [(1)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/0)
# 164| return false;
# 165|
# 166|-> fseek(output, 0, SEEK_END);
# 167|
# 168| while ((c = fgetc(input)) != EOF) {
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(input_filename, "rb")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: throw: if 'fseek' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: danger: 'fopen(input_filename, "rb")' leaks here; was allocated at [(3)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/2)
# 164| return false;
# 165|
# 166|-> fseek(output, 0, SEEK_END);
# 167|
# 168| while ((c = fgetc(input)) != EOF) {
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(output_filename, "ab")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:27: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: throw: if 'fseek' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: danger: 'fopen(output_filename, "ab")' leaks here; was allocated at [(1)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/0)
# 164| return false;
# 165|
# 166|-> fseek(output, 0, SEEK_END);
# 167|
# 168| while ((c = fgetc(input)) != EOF) {
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(input_filename, "rb")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: throw: if 'fgetc' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: danger: 'fopen(input_filename, "rb")' leaks here; was opened at [(3)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/2)
# 166| fseek(output, 0, SEEK_END);
# 167|
# 168|-> while ((c = fgetc(input)) != EOF) {
# 169| fputc(c, output);
# 170| }
Error: GCC_ANALYZER_WARNING (CWE-775):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(output_filename, "ab")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:27: acquire_resource: opened here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: throw: if 'fgetc' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: danger: 'fopen(output_filename, "ab")' leaks here; was opened at [(1)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/0)
# 166| fseek(output, 0, SEEK_END);
# 167|
# 168|-> while ((c = fgetc(input)) != EOF) {
# 169| fputc(c, output);
# 170| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(input_filename, "rb")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: throw: if 'fgetc' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: danger: 'fopen(input_filename, "rb")' leaks here; was allocated at [(3)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/2)
# 166| fseek(output, 0, SEEK_END);
# 167|
# 168|-> while ((c = fgetc(input)) != EOF) {
# 169| fputc(c, output);
# 170| }
Error: GCC_ANALYZER_WARNING (CWE-401):
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(output_filename, "ab")'
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:27: acquire_memory: allocated here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:161:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:26: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:163:11: branch_false: following 'false' branch...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:166:9: branch_false: ...to here
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: throw: if 'fgetc' throws an exception...
flac-1.5.0/src/test_libs_common/file_utils_flac.c:168:21: danger: 'fopen(output_filename, "ab")' leaks here; was allocated at [(1)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/0)
# 166| fseek(output, 0, SEEK_END);
# 167|
# 168|-> while ((c = fgetc(input)) != EOF) {
# 169| fputc(c, output);
# 170| }