faad2-2.11.2-5.fc44

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
faad2-2.11.2/frontend/audio.c:60: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aufile
#   58|       audio_file *aufile = malloc(sizeof(audio_file));
#   59|   
#   60|->     aufile->outputFormat = outputFormat;
#   61|   
#   62|       aufile->samplerate = samplerate;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
faad2-2.11.2/frontend/audio.c:60:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aufile’
faad2-2.11.2/frontend/audio.c:58:26: acquire_memory: this call could return NULL
faad2-2.11.2/frontend/audio.c:60:5: danger: ‘aufile’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   58|       audio_file *aufile = malloc(sizeof(audio_file));
#   59|   
#   60|->     aufile->outputFormat = outputFormat;
#   61|   
#   62|       aufile->samplerate = samplerate;

Error: CPPCHECK_WARNING (CWE-476): [#def3]
faad2-2.11.2/frontend/audio.c:62: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aufile
#   60|       aufile->outputFormat = outputFormat;
#   61|   
#   62|->     aufile->samplerate = samplerate;
#   63|       aufile->channels = channels;
#   64|       aufile->total_samples = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def4]
faad2-2.11.2/frontend/audio.c:63: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aufile
#   61|   
#   62|       aufile->samplerate = samplerate;
#   63|->     aufile->channels = channels;
#   64|       aufile->total_samples = 0;
#   65|       aufile->fileType = fileType;

Error: CPPCHECK_WARNING (CWE-476): [#def5]
faad2-2.11.2/frontend/audio.c:64: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aufile
#   62|       aufile->samplerate = samplerate;
#   63|       aufile->channels = channels;
#   64|->     aufile->total_samples = 0;
#   65|       aufile->fileType = fileType;
#   66|       aufile->channelMask = channelMask;

Error: CPPCHECK_WARNING (CWE-476): [#def6]
faad2-2.11.2/frontend/audio.c:65: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aufile
#   63|       aufile->channels = channels;
#   64|       aufile->total_samples = 0;
#   65|->     aufile->fileType = fileType;
#   66|       aufile->channelMask = channelMask;
#   67|   

Error: CPPCHECK_WARNING (CWE-476): [#def7]
faad2-2.11.2/frontend/audio.c:66: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aufile
#   64|       aufile->total_samples = 0;
#   65|       aufile->fileType = fileType;
#   66|->     aufile->channelMask = channelMask;
#   67|   
#   68|       switch (outputFormat)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
faad2-2.11.2/frontend/audio.c:94:27: warning[-Wanalyzer-malloc-leak]: leak of ‘aufile’
faad2-2.11.2/frontend/audio.c:58:26: acquire_memory: allocated here
faad2-2.11.2/frontend/audio.c:85:7: branch_false: following ‘false’ branch...
faad2-2.11.2/frontend/audio.c:93:9: branch_false: ...to here
faad2-2.11.2/frontend/audio.c:94:27: throw: if ‘faad_fopen’ throws an exception...
faad2-2.11.2/frontend/audio.c:94:27: danger: ‘aufile’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   92|       } else {
#   93|           aufile->toStdio = 0;
#   94|->         aufile->sndfile = faad_fopen(infile, "wb");
#   95|       }
#   96|   

Error: CPPCHECK_WARNING (CWE-476): [#def9]
faad2-2.11.2/frontend/audio.c:346: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  344|       for (i = 0; i < samples; i++)
#  345|       {
#  346|->         data[i*2] = (char)(sample_buffer16[i] & 0xFF);
#  347|           data[i*2+1] = (char)((sample_buffer16[i] >> 8) & 0xFF);
#  348|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
faad2-2.11.2/frontend/audio.c:346:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
faad2-2.11.2/frontend/audio.c:320:18: acquire_memory: this call could return NULL
faad2-2.11.2/frontend/audio.c:344:17: branch_true: following ‘true’ branch (when ‘i < samples’)...
faad2-2.11.2/frontend/audio.c:346:43: branch_true: ...to here
faad2-2.11.2/frontend/audio.c:346:9: danger: ‘data + ((long unsigned int)i * 2 & 4294967295)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  344|       for (i = 0; i < samples; i++)
#  345|       {
#  346|->         data[i*2] = (char)(sample_buffer16[i] & 0xFF);
#  347|           data[i*2+1] = (char)((sample_buffer16[i] >> 8) & 0xFF);
#  348|       }

Error: CPPCHECK_WARNING (CWE-476): [#def11]
faad2-2.11.2/frontend/audio.c:347: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  345|       {
#  346|           data[i*2] = (char)(sample_buffer16[i] & 0xFF);
#  347|->         data[i*2+1] = (char)((sample_buffer16[i] >> 8) & 0xFF);
#  348|       }
#  349|   

Error: CPPCHECK_WARNING (CWE-476): [#def12]
faad2-2.11.2/frontend/audio.c:350: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  348|       }
#  349|   
#  350|->     ret = fwrite(data, samples, aufile->bits_per_sample/8, aufile->sndfile);
#  351|   
#  352|       if (data) free(data);

Error: CPPCHECK_WARNING (CWE-476): [#def13]
faad2-2.11.2/frontend/audio.c:389: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  387|       for (i = 0; i < samples; i++)
#  388|       {
#  389|->         data[i*3] = (char)(sample_buffer24[i] & 0xFF);
#  390|           data[i*3+1] = (char)((sample_buffer24[i] >> 8) & 0xFF);
#  391|           data[i*3+2] = (char)((sample_buffer24[i] >> 16) & 0xFF);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
faad2-2.11.2/frontend/audio.c:389:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
faad2-2.11.2/frontend/audio.c:363:18: acquire_memory: this call could return NULL
faad2-2.11.2/frontend/audio.c:387:17: branch_true: following ‘true’ branch (when ‘i < samples’)...
faad2-2.11.2/frontend/audio.c:389:43: branch_true: ...to here
faad2-2.11.2/frontend/audio.c:389:9: danger: ‘data + (sizetype)(i * 3)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  387|       for (i = 0; i < samples; i++)
#  388|       {
#  389|->         data[i*3] = (char)(sample_buffer24[i] & 0xFF);
#  390|           data[i*3+1] = (char)((sample_buffer24[i] >> 8) & 0xFF);
#  391|           data[i*3+2] = (char)((sample_buffer24[i] >> 16) & 0xFF);

Error: CPPCHECK_WARNING (CWE-476): [#def15]
faad2-2.11.2/frontend/audio.c:390: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  388|       {
#  389|           data[i*3] = (char)(sample_buffer24[i] & 0xFF);
#  390|->         data[i*3+1] = (char)((sample_buffer24[i] >> 8) & 0xFF);
#  391|           data[i*3+2] = (char)((sample_buffer24[i] >> 16) & 0xFF);
#  392|       }

Error: CPPCHECK_WARNING (CWE-476): [#def16]
faad2-2.11.2/frontend/audio.c:391: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  389|           data[i*3] = (char)(sample_buffer24[i] & 0xFF);
#  390|           data[i*3+1] = (char)((sample_buffer24[i] >> 8) & 0xFF);
#  391|->         data[i*3+2] = (char)((sample_buffer24[i] >> 16) & 0xFF);
#  392|       }
#  393|   

Error: CPPCHECK_WARNING (CWE-476): [#def17]
faad2-2.11.2/frontend/audio.c:394: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  392|       }
#  393|   
#  394|->     ret = fwrite(data, samples, aufile->bits_per_sample/8, aufile->sndfile);
#  395|   
#  396|       if (data) free(data);

Error: CPPCHECK_WARNING (CWE-476): [#def18]
faad2-2.11.2/frontend/audio.c:433: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  431|       for (i = 0; i < samples; i++)
#  432|       {
#  433|->         data[i*4] = (char)(sample_buffer32[i] & 0xFF);
#  434|           data[i*4+1] = (char)((sample_buffer32[i] >> 8) & 0xFF);
#  435|           data[i*4+2] = (char)((sample_buffer32[i] >> 16) & 0xFF);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
faad2-2.11.2/frontend/audio.c:433:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
faad2-2.11.2/frontend/audio.c:407:18: acquire_memory: this call could return NULL
faad2-2.11.2/frontend/audio.c:431:17: branch_true: following ‘true’ branch (when ‘i < samples’)...
faad2-2.11.2/frontend/audio.c:433:43: branch_true: ...to here
faad2-2.11.2/frontend/audio.c:433:9: danger: ‘data + ((long unsigned int)i * 4 & 4294967295)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  431|       for (i = 0; i < samples; i++)
#  432|       {
#  433|->         data[i*4] = (char)(sample_buffer32[i] & 0xFF);
#  434|           data[i*4+1] = (char)((sample_buffer32[i] >> 8) & 0xFF);
#  435|           data[i*4+2] = (char)((sample_buffer32[i] >> 16) & 0xFF);

Error: CPPCHECK_WARNING (CWE-476): [#def20]
faad2-2.11.2/frontend/audio.c:434: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  432|       {
#  433|           data[i*4] = (char)(sample_buffer32[i] & 0xFF);
#  434|->         data[i*4+1] = (char)((sample_buffer32[i] >> 8) & 0xFF);
#  435|           data[i*4+2] = (char)((sample_buffer32[i] >> 16) & 0xFF);
#  436|           data[i*4+3] = (char)((sample_buffer32[i] >> 24) & 0xFF);

Error: CPPCHECK_WARNING (CWE-476): [#def21]
faad2-2.11.2/frontend/audio.c:435: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  433|           data[i*4] = (char)(sample_buffer32[i] & 0xFF);
#  434|           data[i*4+1] = (char)((sample_buffer32[i] >> 8) & 0xFF);
#  435|->         data[i*4+2] = (char)((sample_buffer32[i] >> 16) & 0xFF);
#  436|           data[i*4+3] = (char)((sample_buffer32[i] >> 24) & 0xFF);
#  437|       }

Error: CPPCHECK_WARNING (CWE-476): [#def22]
faad2-2.11.2/frontend/audio.c:436: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  434|           data[i*4+1] = (char)((sample_buffer32[i] >> 8) & 0xFF);
#  435|           data[i*4+2] = (char)((sample_buffer32[i] >> 16) & 0xFF);
#  436|->         data[i*4+3] = (char)((sample_buffer32[i] >> 24) & 0xFF);
#  437|       }
#  438|   

Error: CPPCHECK_WARNING (CWE-476): [#def23]
faad2-2.11.2/frontend/audio.c:439: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  437|       }
#  438|   
#  439|->     ret = fwrite(data, samples, aufile->bits_per_sample/8, aufile->sndfile);
#  440|   
#  441|       if (data) free(data);

Error: CPPCHECK_WARNING (CWE-476): [#def24]
faad2-2.11.2/frontend/audio.c:481: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  479|           float in = sample_buffer_f[i];
#  480|   
#  481|->         data[i*4] = 0; data[i*4+1] = 0; data[i*4+2] = 0; data[i*4+3] = 0;
#  482|           if (in == 0.0)
#  483|               continue;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
faad2-2.11.2/frontend/audio.c:481:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
faad2-2.11.2/frontend/audio.c:452:27: acquire_memory: this call could return NULL
faad2-2.11.2/frontend/audio.c:476:17: branch_true: following ‘true’ branch (when ‘i < samples’)...
faad2-2.11.2/frontend/audio.c:479:35: branch_true: ...to here
faad2-2.11.2/frontend/audio.c:481:9: danger: ‘data + ((long unsigned int)i * 4 & 4294967295)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  479|           float in = sample_buffer_f[i];
#  480|   
#  481|->         data[i*4] = 0; data[i*4+1] = 0; data[i*4+2] = 0; data[i*4+3] = 0;
#  482|           if (in == 0.0)
#  483|               continue;

Error: CPPCHECK_WARNING (CWE-476): [#def26]
faad2-2.11.2/frontend/main.c:357: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  355|   
#  356|       data = malloc(*dataSize * sizeof(unsigned char));
#  357|->     memset(data, 0, *dataSize * sizeof(unsigned char));
#  358|   
#  359|       data[0] += 0xFF; /* 8b: syncword */

Error: CPPCHECK_WARNING (CWE-476): [#def27]
faad2-2.11.2/frontend/main.c:359: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  357|       memset(data, 0, *dataSize * sizeof(unsigned char));
#  358|   
#  359|->     data[0] += 0xFF; /* 8b: syncword */
#  360|   
#  361|       data[1] += 0xF0; /* 4b: syncword */

Error: CPPCHECK_WARNING (CWE-476): [#def28]
faad2-2.11.2/frontend/main.c:361: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  359|       data[0] += 0xFF; /* 8b: syncword */
#  360|   
#  361|->     data[1] += 0xF0; /* 4b: syncword */
#  362|       /* 1b: mpeg id = 0 */
#  363|       /* 2b: layer = 0 */

Error: CPPCHECK_WARNING (CWE-476): [#def29]
faad2-2.11.2/frontend/main.c:364: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  362|       /* 1b: mpeg id = 0 */
#  363|       /* 2b: layer = 0 */
#  364|->     data[1] += 1; /* 1b: protection absent */
#  365|   
#  366|       data[2] += ((profile << 6) & 0xC0); /* 2b: profile */

Error: CPPCHECK_WARNING (CWE-476): [#def30]
faad2-2.11.2/frontend/main.c:366: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  364|       data[1] += 1; /* 1b: protection absent */
#  365|   
#  366|->     data[2] += ((profile << 6) & 0xC0); /* 2b: profile */
#  367|       data[2] += ((sr_index << 2) & 0x3C); /* 4b: sampling_frequency_index */
#  368|       /* 1b: private = 0 */

Error: CPPCHECK_WARNING (CWE-476): [#def31]
faad2-2.11.2/frontend/main.c:367: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  365|   
#  366|       data[2] += ((profile << 6) & 0xC0); /* 2b: profile */
#  367|->     data[2] += ((sr_index << 2) & 0x3C); /* 4b: sampling_frequency_index */
#  368|       /* 1b: private = 0 */
#  369|       data[2] += ((hInfo->channels >> 2) & 0x1); /* 1b: channel_configuration */

Error: CPPCHECK_WARNING (CWE-476): [#def32]
faad2-2.11.2/frontend/main.c:369: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  367|       data[2] += ((sr_index << 2) & 0x3C); /* 4b: sampling_frequency_index */
#  368|       /* 1b: private = 0 */
#  369|->     data[2] += ((hInfo->channels >> 2) & 0x1); /* 1b: channel_configuration */
#  370|   
#  371|       data[3] += ((hInfo->channels << 6) & 0xC0); /* 2b: channel_configuration */

Error: CPPCHECK_WARNING (CWE-476): [#def33]
faad2-2.11.2/frontend/main.c:371: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  369|       data[2] += ((hInfo->channels >> 2) & 0x1); /* 1b: channel_configuration */
#  370|   
#  371|->     data[3] += ((hInfo->channels << 6) & 0xC0); /* 2b: channel_configuration */
#  372|       /* 1b: original */
#  373|       /* 1b: home */

Error: CPPCHECK_WARNING (CWE-476): [#def34]
faad2-2.11.2/frontend/main.c:376: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  374|       /* 1b: copyright_id */
#  375|       /* 1b: copyright_id_start */
#  376|->     data[3] += ((framesize >> 11) & 0x3); /* 2b: aac_frame_length */
#  377|   
#  378|       data[4] += ((framesize >> 3) & 0xFF); /* 8b: aac_frame_length */

Error: CPPCHECK_WARNING (CWE-476): [#def35]
faad2-2.11.2/frontend/main.c:378: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  376|       data[3] += ((framesize >> 11) & 0x3); /* 2b: aac_frame_length */
#  377|   
#  378|->     data[4] += ((framesize >> 3) & 0xFF); /* 8b: aac_frame_length */
#  379|   
#  380|       data[5] += ((framesize << 5) & 0xE0); /* 3b: aac_frame_length */

Error: CPPCHECK_WARNING (CWE-476): [#def36]
faad2-2.11.2/frontend/main.c:380: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  378|       data[4] += ((framesize >> 3) & 0xFF); /* 8b: aac_frame_length */
#  379|   
#  380|->     data[5] += ((framesize << 5) & 0xE0); /* 3b: aac_frame_length */
#  381|       data[5] += ((0x7FF >> 6) & 0x1F); /* 5b: adts_buffer_fullness */
#  382|   

Error: CPPCHECK_WARNING (CWE-476): [#def37]
faad2-2.11.2/frontend/main.c:381: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  379|   
#  380|       data[5] += ((framesize << 5) & 0xE0); /* 3b: aac_frame_length */
#  381|->     data[5] += ((0x7FF >> 6) & 0x1F); /* 5b: adts_buffer_fullness */
#  382|   
#  383|       data[6] += ((0x7FF << 2) & 0x3F); /* 6b: adts_buffer_fullness */

Error: CPPCHECK_WARNING (CWE-476): [#def38]
faad2-2.11.2/frontend/main.c:383: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  381|       data[5] += ((0x7FF >> 6) & 0x1F); /* 5b: adts_buffer_fullness */
#  382|   
#  383|->     data[6] += ((0x7FF << 2) & 0x3F); /* 6b: adts_buffer_fullness */
#  384|       /* 2b: num_raw_data_blocks */
#  385|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
faad2-2.11.2/frontend/main.c:499:20: warning[-Wanalyzer-malloc-leak]: leak of ‘aacFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  497|       else
#  498|       {
#  499|->         b.infile = faad_fopen(aacfile, "rb");
#  500|           if (b.infile == NULL)
#  501|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
faad2-2.11.2/frontend/main.c:499:20: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  497|       else
#  498|       {
#  499|->         b.infile = faad_fopen(aacfile, "rb");
#  500|           if (b.infile == NULL)
#  501|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
faad2-2.11.2/frontend/main.c:508:14: warning[-Wanalyzer-malloc-leak]: leak of ‘aacFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  506|       }
#  507|   
#  508|->     retval = fseek(b.infile, 0, SEEK_END);
#  509|   #ifdef _WIN32
#  510|       if (0 == strcmp(aacfile, "-")) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
faad2-2.11.2/frontend/main.c:508:14: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  506|       }
#  507|   
#  508|->     retval = fseek(b.infile, 0, SEEK_END);
#  509|   #ifdef _WIN32
#  510|       if (0 == strcmp(aacfile, "-")) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
faad2-2.11.2/frontend/main.c:520:20: warning[-Wanalyzer-malloc-leak]: leak of ‘aacFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  518|           streaminput = 1;
#  519|       } else {
#  520|->         fileread = ftell(b.infile);
#  521|           fseek(b.infile, 0, SEEK_SET);
#  522|       };

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
faad2-2.11.2/frontend/main.c:520:20: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  518|           streaminput = 1;
#  519|       } else {
#  520|->         fileread = ftell(b.infile);
#  521|           fseek(b.infile, 0, SEEK_SET);
#  522|       };

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
faad2-2.11.2/frontend/main.c:521:9: warning[-Wanalyzer-malloc-leak]: leak of ‘aacFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  519|       } else {
#  520|           fileread = ftell(b.infile);
#  521|->         fseek(b.infile, 0, SEEK_SET);
#  522|       };
#  523|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
faad2-2.11.2/frontend/main.c:521:9: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  519|       } else {
#  520|           fileread = ftell(b.infile);
#  521|->         fseek(b.infile, 0, SEEK_SET);
#  522|       };
#  523|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
faad2-2.11.2/frontend/main.c:820:9: warning[-Wanalyzer-malloc-leak]: leak of ‘aacFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  818|           mp4config.verbose.tags = 1;
#  819|       }
#  820|->     if (mp4read_open(mp4file))
#  821|       {
#  822|           /* unable to open file */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
faad2-2.11.2/frontend/main.c:820:9: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  818|           mp4config.verbose.tags = 1;
#  819|       }
#  820|->     if (mp4read_open(mp4file))
#  821|       {
#  822|           /* unable to open file */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
faad2-2.11.2/frontend/main.c:827:16: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  825|       }
#  826|   
#  827|->     hDecoder = NeAACDecOpen();
#  828|   
#  829|       /* Set configuration */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
faad2-2.11.2/frontend/main.c:830:14: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  828|   
#  829|       /* Set configuration */
#  830|->     config = NeAACDecGetCurrentConfiguration(hDecoder);
#  831|       config->outputFormat = outputFormat;
#  832|       config->downMatrix = downMatrix;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
faad2-2.11.2/frontend/main.c:834:5: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  832|       config->downMatrix = downMatrix;
#  833|       //config->dontUpSampleImplicitSBR = 1;
#  834|->     NeAACDecSetConfiguration(hDecoder, config);
#  835|   
#  836|       if (adts_out)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
faad2-2.11.2/frontend/main.c:846:8: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  844|       }
#  845|   
#  846|->     if(NeAACDecInit2(hDecoder, mp4config.asc.buf, mp4config.asc.size,
#  847|                       &samplerate, &channels) < 0)
#  848|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
faad2-2.11.2/frontend/main.c:851:9: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  849|           /* If some error initializing occured, skip the file */
#  850|           faad_fprintf(stderr, "Error initializing decoder library.\n");
#  851|->         NeAACDecClose(hDecoder);
#  852|           mp4read_close();
#  853|           return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
faad2-2.11.2/frontend/main.c:852:9: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  850|           faad_fprintf(stderr, "Error initializing decoder library.\n");
#  851|           NeAACDecClose(hDecoder);
#  852|->         mp4read_close();
#  853|           return 1;
#  854|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
faad2-2.11.2/frontend/main.c:862:13: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
#  860|       if (mp4config.asc.size)
#  861|       {
#  862|->         if (NeAACDecAudioSpecificConfig(mp4config.asc.buf, mp4config.asc.size, &mp4ASC) >= 0)
#  863|           {
#  864|               if (mp4ASC.frameLengthFlag == 1) framesize = 960;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
faad2-2.11.2/frontend/main.c:1291:20: warning[-Wanalyzer-malloc-leak]: leak of ‘aacFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
# 1289|   
# 1290|           mp4file = 0;
# 1291|->         hMP4File = faad_fopen(aacFileName, "rb");
# 1292|           if (!hMP4File)
# 1293|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
faad2-2.11.2/frontend/main.c:1291:20: warning[-Wanalyzer-malloc-leak]: leak of ‘audioFileName’
faad2-2.11.2/frontend/main.c:1362:5: enter_function: entry to ‘main’
faad2-2.11.2/frontend/main.c:1376:12: call_function: calling ‘faad_main’ from ‘main’
# 1289|   
# 1290|           mp4file = 0;
# 1291|->         hMP4File = faad_fopen(aacFileName, "rb");
# 1292|           if (!hMP4File)
# 1293|           {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def58]
faad2-2.11.2/libfaad/filtbank.c:280:76: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘window_short’
faad2-2.11.2/libfaad/filtbank.c:189:8: branch_true: following ‘true’ branch (when ‘object_type == 23’)...
faad2-2.11.2/libfaad/filtbank.c:191:29: branch_true: ...to here
faad2-2.11.2/libfaad/filtbank.c:278:20: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/filtbank.c:280:53: branch_true: ...to here
faad2-2.11.2/libfaad/filtbank.c:280:76: release_memory: ‘window_short’ is NULL
faad2-2.11.2/libfaad/filtbank.c:280:76: danger: dereference of NULL ‘window_short_prev + (long unsigned int)i * 4’
#  278|           for(i = 0; i < nshort; i++)
#  279|           {
#  280|->             time_out[nflat_ls+         i] = overlap[nflat_ls+         i] + MUL_F(transf_buf[nshort*0+i],window_short_prev[i]);
#  281|               time_out[nflat_ls+1*nshort+i] = overlap[nflat_ls+nshort*1+i] + MUL_F(transf_buf[nshort*1+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*2+i],window_short[i]);
#  282|               time_out[nflat_ls+2*nshort+i] = overlap[nflat_ls+nshort*2+i] + MUL_F(transf_buf[nshort*3+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*4+i],window_short[i]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def59]
faad2-2.11.2/libfaad/filtbank.c:311:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘window_short_prev’
faad2-2.11.2/libfaad/filtbank.c:189:8: branch_true: following ‘true’ branch (when ‘object_type == 23’)...
faad2-2.11.2/libfaad/filtbank.c:191:29: branch_true: ...to here
faad2-2.11.2/libfaad/filtbank.c:310:21: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/filtbank.c:311:44: branch_true: ...to here
faad2-2.11.2/libfaad/filtbank.c:311:58: danger: dereference of NULL ‘window_short_prev + (long unsigned int)i * 4’
#  309|               time_out[i] = overlap[i];
#  310|           for (i = 0; i < nshort; i++)
#  311|->             time_out[nflat_ls+i] = overlap[nflat_ls+i] + MUL_F(transf_buf[nflat_ls+i],window_short_prev[i]);
#  312|           for (i = 0; i < nflat_ls; i++)
#  313|               time_out[nflat_ls+nshort+i] = overlap[nflat_ls+nshort+i] + transf_buf[nflat_ls+nshort+i];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def60]
faad2-2.11.2/libfaad/filtbank.c:399:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘window_short_prev’
faad2-2.11.2/libfaad/filtbank.c:358:8: branch_true: following ‘true’ branch (when ‘object_type == 23’)...
faad2-2.11.2/libfaad/filtbank.c:360:29: branch_true: ...to here
faad2-2.11.2/libfaad/filtbank.c:398:21: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/filtbank.c:399:40: branch_true: ...to here
faad2-2.11.2/libfaad/filtbank.c:399:40: danger: dereference of NULL ‘window_short_prev + (long unsigned int)i * 4’
#  397|               windowed_buf[i] = 0;
#  398|           for (i = 0; i < nshort; i++)
#  399|->             windowed_buf[i+nflat_ls] = MUL_F(in_data[i+nflat_ls], window_short_prev[i]);
#  400|           for (i = 0; i < nflat_ls; i++)
#  401|               windowed_buf[i+nflat_ls+nshort] = in_data[i+nflat_ls+nshort];

Error: COMPILER_WARNING (CWE-457): [#def61]
faad2-2.11.2/libfaad/ps_dec.c:449:8: warning[-Wmaybe-uninitialized]: ‘input_re1[0]’ may be used uninitialized
#  449 |     f2 = x[0] - f0;
#      |     ~~~^~~~~~~~~~~
faad2-2.11.2/libfaad/ps_dec.c: scope_hint: In function ‘ps_decode’
faad2-2.11.2/libfaad/ps_dec.c:468:12: note: ‘input_re1[0]’ was declared here
#  468 |     real_t input_re1[6], input_re2[6], input_im1[6], input_im2[6];
#      |            ^~~~~~~~~
#  447|       f0 = MUL_F(x[3], FRAC_CONST(0.70710678118655));
#  448|       f1 = x[0] + f0;
#  449|->     f2 = x[0] - f0;
#  450|       f3 = MUL_F((x[1] - x[5]), FRAC_CONST(0.70710678118655));
#  451|       f4 = MUL_F(x[2], FRAC_CONST(0.86602540378444)) + MUL_F(x[4], FRAC_CONST(0.5));

Error: COMPILER_WARNING (CWE-457): [#def62]
faad2-2.11.2/libfaad/ps_dec.c:449:8: warning[-Wmaybe-uninitialized]: ‘input_re2[0]’ may be used uninitialized
#  449 |     f2 = x[0] - f0;
#      |     ~~~^~~~~~~~~~~
faad2-2.11.2/libfaad/ps_dec.c: scope_hint: In function ‘ps_decode’
faad2-2.11.2/libfaad/ps_dec.c:468:26: note: ‘input_re2[0]’ was declared here
#  468 |     real_t input_re1[6], input_re2[6], input_im1[6], input_im2[6];
#      |                          ^~~~~~~~~
#  447|       f0 = MUL_F(x[3], FRAC_CONST(0.70710678118655));
#  448|       f1 = x[0] + f0;
#  449|->     f2 = x[0] - f0;
#  450|       f3 = MUL_F((x[1] - x[5]), FRAC_CONST(0.70710678118655));
#  451|       f4 = MUL_F(x[2], FRAC_CONST(0.86602540378444)) + MUL_F(x[4], FRAC_CONST(0.5));

Error: GCC_ANALYZER_WARNING (CWE-457): [#def63]
faad2-2.11.2/libfaad/ps_dec.c:1376:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘temp_delay_ser[<unknown>]’
faad2-2.11.2/libfaad/ps_dec.c:1062:17: branch_true: following ‘true’ branch (when ‘n != 32’)...
faad2-2.11.2/libfaad/ps_dec.c:1062:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1064:22: branch_true: following ‘true’ branch (when ‘bk != 34’)...
faad2-2.11.2/libfaad/ps_dec.c:1066:13: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1062:17: branch_false: following ‘false’ branch (when ‘n == 32’)...
faad2-2.11.2/libfaad/ps_dec.c:1062:17: branch_false: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1375:17: branch_true: following ‘true’ branch (when ‘n != 3’)...
faad2-2.11.2/libfaad/ps_dec.c:1376:38: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1376:38: danger: use of uninitialized value ‘temp_delay_ser[<unknown>]’ here
# 1374|       ps->saved_delay = temp_delay;
# 1375|       for (n = 0; n < NO_ALLPASS_LINKS; n++)
# 1376|->         ps->delay_buf_index_ser[n] = temp_delay_ser[n];
# 1377|   }
# 1378|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def64]
faad2-2.11.2/libfaad/ps_dec.c:1554:21: warning[-Wanalyzer-out-of-bounds]: buffer over-read
faad2-2.11.2/libfaad/ps_dec.c:1474:8: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1483:9: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1490:18: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1492:35: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1497:23: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1499:44: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1504:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1505:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1515:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1516:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1523:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1542:45: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1549:20: branch_false: following ‘false’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1554:28: branch_false: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1554:21: danger: out-of-bounds read from byte 480 till byte 483 but ‘cos_betas_normal’ ends at byte 256
# 1552|                       sinb = sin_betas_fine[abs_iid][ps->icc_index[env][bk]];
# 1553|                   } else {
# 1554|->                     cosb = cos_betas_normal[abs_iid][ps->icc_index[env][bk]];
# 1555|                       sinb = sin_betas_normal[abs_iid][ps->icc_index[env][bk]];
# 1556|                   }

Error: GCC_ANALYZER_WARNING (CWE-126): [#def65]
faad2-2.11.2/libfaad/ps_dec.c:1555:21: warning[-Wanalyzer-out-of-bounds]: buffer over-read
faad2-2.11.2/libfaad/ps_dec.c:1474:8: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1483:9: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1490:18: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1492:35: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1497:23: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1499:44: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1504:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1505:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1515:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1516:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1523:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1542:45: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1549:20: branch_false: following ‘false’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1554:28: branch_false: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1555:21: danger: out-of-bounds read from byte 480 till byte 483 but ‘sin_betas_normal’ ends at byte 256
# 1553|                   } else {
# 1554|                       cosb = cos_betas_normal[abs_iid][ps->icc_index[env][bk]];
# 1555|->                     sinb = sin_betas_normal[abs_iid][ps->icc_index[env][bk]];
# 1556|                   }
# 1557|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def66]
faad2-2.11.2/libfaad/ps_dec.c:1615:21: warning[-Wanalyzer-out-of-bounds]: buffer over-read
faad2-2.11.2/libfaad/ps_dec.c:1474:8: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1483:9: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1490:18: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1492:35: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1497:23: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1499:44: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1504:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1505:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1515:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1516:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1523:16: branch_false: following ‘false’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1606:21: branch_false: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1606:20: branch_false: following ‘false’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1613:66: branch_false: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1615:21: danger: out-of-bounds read from byte 480 till byte 483 but ‘cos_gammas_normal’ ends at byte 256
# 1613|                       cosa = sincos_alphas_B_normal[no_iid_steps + ps->iid_index[env][bk]][ps->icc_index[env][bk]];
# 1614|                       sina = sincos_alphas_B_normal[14 - (no_iid_steps + ps->iid_index[env][bk])][ps->icc_index[env][bk]];
# 1615|->                     cosg = cos_gammas_normal[abs_iid][ps->icc_index[env][bk]];
# 1616|                       sing = sin_gammas_normal[abs_iid][ps->icc_index[env][bk]];
# 1617|                   }

Error: GCC_ANALYZER_WARNING (CWE-126): [#def67]
faad2-2.11.2/libfaad/ps_dec.c:1616:21: warning[-Wanalyzer-out-of-bounds]: buffer over-read
faad2-2.11.2/libfaad/ps_dec.c:1474:8: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1483:9: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1490:18: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1492:35: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1497:23: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1499:44: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1504:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1505:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1515:16: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1516:17: branch_true: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1523:16: branch_false: following ‘false’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1606:21: branch_false: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1606:20: branch_false: following ‘false’ branch...
faad2-2.11.2/libfaad/ps_dec.c:1613:66: branch_false: ...to here
faad2-2.11.2/libfaad/ps_dec.c:1616:21: danger: out-of-bounds read from byte 480 till byte 483 but ‘sin_gammas_normal’ ends at byte 256
# 1614|                       sina = sincos_alphas_B_normal[14 - (no_iid_steps + ps->iid_index[env][bk])][ps->icc_index[env][bk]];
# 1615|                       cosg = cos_gammas_normal[abs_iid][ps->icc_index[env][bk]];
# 1616|->                     sing = sin_gammas_normal[abs_iid][ps->icc_index[env][bk]];
# 1617|                   }
# 1618|   

Error: CPPCHECK_WARNING (CWE-758): [#def68]
faad2-2.11.2/libfaad/sbr_hfgen.c:291: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  289|           real_t x;
#  290|           x = QMF_RE(buffer[j][bd])>>REAL_BITS;
#  291|->         mask |= x ^ (x >> 31);
#  292|           x = QMF_IM(buffer[j][bd])>>REAL_BITS;
#  293|           mask |= x ^ (x >> 31);

Error: CPPCHECK_WARNING (CWE-758): [#def69]
faad2-2.11.2/libfaad/sbr_hfgen.c:293: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  291|           mask |= x ^ (x >> 31);
#  292|           x = QMF_IM(buffer[j][bd])>>REAL_BITS;
#  293|->         mask |= x ^ (x >> 31);
#  294|       }
#  295|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def70]
faad2-2.11.2/libfaad/specrec.c:757:12: warning[-Wanalyzer-deref-before-check]: check of ‘*hDecoder.time_out[<unknown>]’ for NULL after already dereferencing it
faad2-2.11.2/libfaad/specrec.c:905:9: enter_function: entry to ‘reconstruct_single_channel’
faad2-2.11.2/libfaad/specrec.c:951:8: branch_true: following ‘true’ branch...
faad2-2.11.2/libfaad/specrec.c:953:18: branch_true: ...to here
faad2-2.11.2/libfaad/specrec.c:953:18: call_function: calling ‘allocate_single_channel’ from ‘reconstruct_single_channel’
#  755|       if (output_channels == 2)
#  756|       {
#  757|->         if (hDecoder->time_out[channel+1] != NULL)
#  758|           {
#  759|               faad_free(hDecoder->time_out[channel+1]);

Error: COMPILER_WARNING (CWE-686): [#def71]
faad2-2.11.2/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-jKMaAR/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘lrintf’; expected ‘long int(float)’

Scan Properties

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