opus-1.6-2.fc44

List of Findings

Error: CPPCHECK_WARNING (CWE-758): [#def1]
opus-1.6/celt/celt_decoder.c:903: error[subtractPointers]: Subtracting pointers that point to different objects
#  901|               celt_fir(exc+max_period-exc_length, lpc+c*CELT_LPC_ORDER,
#  902|                     fir_tmp, exc_length, CELT_LPC_ORDER, st->arch);
#  903|->             OPUS_COPY(exc+max_period-exc_length, fir_tmp, exc_length);
#  904|            }
#  905|   

Error: CPPCHECK_WARNING (CWE-457): [#def2]
opus-1.6/celt/celt_decoder.c:1451: warning[uninitvar]: Uninitialized variable: offsets
# 1449|      ALLOC(fine_priority, nbEBands, int);
# 1450|   
# 1451|->    codedBands = clt_compute_allocation(mode, start, end, offsets, cap,
# 1452|            alloc_trim, &intensity, &dual_stereo, bits, &balance, pulses,
# 1453|            fine_quant, fine_priority, C, LM, dec, 0, 0, 0);

Error: CPPCHECK_WARNING (CWE-758): [#def3]
opus-1.6/celt/celt_encoder.c:702: error[subtractPointers]: Subtracting pointers that point to different objects
#  700|         if (isTransient && !narrow)
#  701|         {
#  702|->          OPUS_COPY(tmp_1, tmp, N);
#  703|            haar1(tmp_1, N>>LM, 1<<LM);
#  704|            L1 = l1_metric(tmp_1, N, LM+1, bias);

Error: CPPCHECK_WARNING (CWE-758): [#def4]
opus-1.6/celt/celt_encoder.c:1089: error[subtractPointers]: Subtracting pointers that point to different objects
# 1087|               mask[i] = MAXG(mask[i], bandLogE[nbEBands+i]-noise_floor[i]);
# 1088|         }
# 1089|->       OPUS_COPY(sig, mask, end);
# 1090|         for (i=1;i<end;i++)
# 1091|            mask[i] = MAXG(mask[i], mask[i-1] - GCONST(2.f));

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
opus-1.6/celt/celt_encoder.c:1307:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
opus-1.6/celt/celt_encoder.c:2865:5: enter_function: entry to 'opus_custom_encode24'
opus-1.6/celt/celt_encoder.c:2871:7: branch_false: following 'false' branch (when 'pcm' is non-NULL)...
opus-1.6/celt/celt_encoder.c:2874:4: branch_false: ...to here
opus-1.6/celt/celt_encoder.c:2881:8: call_function: calling 'celt_encode_with_ec' from 'opus_custom_encode24'
# 1305|      for (i=0;i<len-2*delay;i++) {
# 1306|         r00 += MULT16_16(x[i],x[i]);
# 1307|->       r01 += MULT16_16(x[i],x[i+delay]);
# 1308|         r02 += MULT16_16(x[i],x[i+2*delay]);
# 1309|      }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def6]
opus-1.6/celt/celt_encoder.c:1314:78: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
opus-1.6/celt/celt_encoder.c:2865:5: enter_function: entry to 'opus_custom_encode24'
opus-1.6/celt/celt_encoder.c:2871:7: branch_false: following 'false' branch (when 'pcm' is non-NULL)...
opus-1.6/celt/celt_encoder.c:2874:4: branch_false: ...to here
opus-1.6/celt/celt_encoder.c:2881:8: call_function: calling 'celt_encode_with_ec' from 'opus_custom_encode24'
# 1312|      r11 = r00+edges;
# 1313|      edges = 0;
# 1314|->    for (i=0;i<delay;i++) edges += MULT16_16(x[len+i-delay],x[len+i-delay]) - MULT16_16(x[i+delay],x[i+delay]);
# 1315|      r22 = r11+edges;
# 1316|      edges = 0;

Error: CPPCHECK_WARNING (CWE-758): [#def7]
opus-1.6/celt/celt_encoder.c:2199: error[subtractPointers]: Subtracting pointers that point to different objects
# 2197|      if (!secondMdct)
# 2198|      {
# 2199|->       OPUS_COPY(bandLogE2, bandLogE, C*nbEBands);
# 2200|      }
# 2201|   

Error: CPPCHECK_WARNING (CWE-457): [#def8]
opus-1.6/celt/celt_lpc.c:174: warning[uninitvar]: Uninitialized variable: rnum
#  172|            xcorr_kernel_c(rnum, x+i-ord, sum_c, ord);
#  173|   #endif
#  174|->          xcorr_kernel(rnum, x+i-ord, sum, ord, arch);
#  175|   #if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
#  176|            celt_assert(memcmp(sum, sum_c, sizeof(sum)) == 0);

Error: CPPCHECK_WARNING (CWE-457): [#def9]
opus-1.6/celt/celt_lpc.c:248: warning[uninitvar]: Uninitialized variable: rden
#  246|            xcorr_kernel_c(rden, y+i, sum_c, ord);
#  247|   #endif
#  248|->          xcorr_kernel(rden, y+i, sum, ord, arch);
#  249|   #if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
#  250|            celt_assert(memcmp(sum, sum_c, sizeof(sum)) == 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
opus-1.6/celt/entenc.c:62:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
opus-1.6/celt/tests/test_unit_entropy.c:53:5: enter_function: entry to ‘main’
opus-1.6/celt/tests/test_unit_entropy.c:70:6: branch_false: following ‘false’ branch (when ‘_argc <= 2’)...
opus-1.6/celt/tests/test_unit_entropy.c:74:14: branch_false: ...to here
opus-1.6/celt/tests/test_unit_entropy.c:82:26: acquire_memory: this call could return NULL
opus-1.6/celt/tests/test_unit_entropy.c:84:12: branch_true: following ‘true’ branch (when ‘ft != 1024’)...
opus-1.6/celt/tests/test_unit_entropy.c:84:12: branch_true: ...to here
opus-1.6/celt/tests/test_unit_entropy.c:85:13: branch_true: following ‘true’ branch (when ‘ft > i’)...
opus-1.6/celt/tests/test_unit_entropy.c:86:16: branch_true: ...to here
opus-1.6/celt/tests/test_unit_entropy.c:87:7: call_function: calling ‘ec_enc_uint’ from ‘main’
#   60|   static int ec_write_byte(ec_enc *_this,unsigned _value){
#   61|     if(_this->offs+_this->end_offs>=_this->storage)return -1;
#   62|->   _this->buf[_this->offs++]=(unsigned char)_value;
#   63|     return 0;
#   64|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
opus-1.6/celt/mini_kfft.c:295:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘Fout’
opus-1.6/celt/tests/test_unit_mini_kfft.c:83:6: enter_function: entry to ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:95:31: acquire_memory: this call could return NULL
opus-1.6/celt/tests/test_unit_mini_kfft.c:97:14: branch_false: following ‘false’ branch (when ‘k >= nfft’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:97:14: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mini_kfft.c:102:14: branch_false: following ‘false’ branch (when ‘k >= nfft’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:107:8: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mini_kfft.c:107:8: branch_false: following ‘false’ branch (when ‘isinverse == 0’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:120:8: call_function: inlined call to ‘mini_kiss_fft’ from ‘test1d’
#  293|       if (m==1) {
#  294|           do{
#  295|->             *Fout = *f;
#  296|               f += fstride*in_stride;
#  297|           }while(++Fout != Fout_end );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
opus-1.6/celt/mini_kfft.c:295:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘f’
opus-1.6/celt/tests/test_unit_mini_kfft.c:83:6: enter_function: entry to ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:94:30: acquire_memory: this call could return NULL
opus-1.6/celt/tests/test_unit_mini_kfft.c:97:14: branch_false: following ‘false’ branch (when ‘k >= nfft’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:97:14: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mini_kfft.c:102:14: branch_false: following ‘false’ branch (when ‘k >= nfft’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:107:8: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mini_kfft.c:107:8: branch_false: following ‘false’ branch (when ‘isinverse == 0’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:120:8: call_function: inlined call to ‘mini_kiss_fft’ from ‘test1d’
#  293|       if (m==1) {
#  294|           do{
#  295|->             *Fout = *f;
#  296|               f += fstride*in_stride;
#  297|           }while(++Fout != Fout_end );

Error: GCC_ANALYZER_WARNING (CWE-457): [#def13]
opus-1.6/celt/mini_kfft.c:295:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*f’
opus-1.6/celt/tests/test_unit_mini_kfft.c:83:6: enter_function: entry to ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:97:14: branch_false: following ‘false’ branch (when ‘k >= nfft’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:97:14: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mini_kfft.c:102:14: branch_false: following ‘false’ branch (when ‘k >= nfft’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:107:8: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mini_kfft.c:107:8: branch_false: following ‘false’ branch (when ‘isinverse == 0’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:120:8: call_function: inlined call to ‘mini_kiss_fft’ from ‘test1d’
#  293|       if (m==1) {
#  294|           do{
#  295|->             *Fout = *f;
#  296|               f += fstride*in_stride;
#  297|           }while(++Fout != Fout_end );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
opus-1.6/celt/modes.c:101:10: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'malloc(44)'
opus-1.6/celt/modes.c:90:20: enter_function: entry to 'compute_ebands'
opus-1.6/celt/modes.c:96:7: branch_true: following 'true' branch...
opus-1.6/celt/modes.c:98:7: branch_true: ...to here
opus-1.6/celt/modes.c:99:16: call_function: inlined call to 'opus_alloc' from 'compute_ebands'
opus-1.6/celt/modes.c:100:16: branch_true: following 'true' branch...
opus-1.6/celt/modes.c:101:16: branch_true: ...to here
opus-1.6/celt/modes.c:101:10: danger: 'malloc(44) + (long unsigned int)i * 2' could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   99|         eBands = opus_alloc(sizeof(opus_int16)*(*nbEBands+1));
#  100|         for (i=0;i<*nbEBands+1;i++)
#  101|->          eBands[i] = eband5ms[i];
#  102|         return eBands;
#  103|      }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def15]
opus-1.6/celt/modes.c:466:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*mode.allocVectors'
opus-1.6/celt/modes.c:227:11: enter_function: entry to 'opus_custom_mode_create'
opus-1.6/celt/modes.c:245:13: branch_true: following 'true' branch (when 'i == 0')...
opus-1.6/celt/modes.c:245:13: branch_true: ...to here
opus-1.6/celt/modes.c:248:16: branch_true: following 'true' branch (when 'j != 4')...
opus-1.6/celt/modes.c:250:13: branch_true: ...to here
opus-1.6/celt/modes.c:269:7: branch_false: following 'false' branch...
opus-1.6/celt/modes.c:278:8: branch_false: ...to here
opus-1.6/celt/modes.c:278:7: branch_false: following 'false' branch...
opus-1.6/celt/modes.c:286:7: branch_false: following 'false' branch...
opus-1.6/celt/modes.c:293:8: branch_false: ...to here
opus-1.6/celt/modes.c:308:7: branch_false: following 'false' branch...
opus-1.6/celt/modes.c:315:11: call_function: inlined call to 'opus_alloc' from 'opus_custom_mode_create'
opus-1.6/celt/modes.c:316:7: branch_false: following 'false' branch...
opus-1.6/celt/modes.c:318:4: branch_false: ...to here
opus-1.6/celt/modes.c:363:19: call_function: calling 'compute_ebands' from 'opus_custom_mode_create'
opus-1.6/celt/modes.c:363:19: return_function: returning to 'opus_custom_mode_create' from 'compute_ebands'
opus-1.6/celt/modes.c:364:7: branch_false: following 'false' branch...
opus-1.6/celt/modes.c:369:22: branch_false: ...to here
opus-1.6/celt/modes.c:369:7: branch_true: following 'true' branch...
opus-1.6/celt/modes.c:371:8: branch_true: ...to here
opus-1.6/celt/modes.c:434:7: branch_true: following 'true' branch...
opus-1.6/celt/modes.c:435:7: branch_true: ...to here
opus-1.6/celt/modes.c:435:7: call_function: calling 'opus_custom_mode_destroy' from 'opus_custom_mode_create'
#  464|   #endif
#  465|      opus_free((opus_int16*)mode->eBands);
#  466|->    opus_free((unsigned char*)mode->allocVectors);
#  467|   
#  468|      opus_free((opus_val16*)mode->window);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
opus-1.6/celt/opus_custom_demo.c:333:35: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fbytes’
opus-1.6/celt/opus_custom_demo.c:137:7: branch_false: following ‘false’ branch (when ‘argc > 6’)...
opus-1.6/celt/opus_custom_demo.c:142:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:175:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:181:26: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:184:7: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:186:47: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:188:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:196:11: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:233:7: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:234:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:235:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:240:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:240:10: branch_false: following ‘false’ branch (when ‘complexity < 0’)...
opus-1.6/celt/opus_custom_demo.c:248:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:263:7: branch_false: following ‘false’ branch (when ‘encode_only != 0’)...
opus-1.6/celt/opus_custom_demo.c:275:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:275:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:280:17: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:289:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:294:29: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:296:29: acquire_memory: this call could return NULL
opus-1.6/celt/opus_custom_demo.c:298:11: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:301:10: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:301:10: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:326:30: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:327:13: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:329:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:329:13: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/celt/opus_custom_demo.c:329:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:330:21: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:333:25: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:333:35: danger: ‘fbytes + (sizetype)(i * 2)’ could be NULL: unchecked value from [(25)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/24)
#  331|               {
#  332|                  opus_int32 s;
#  333|->                s=fbytes[2*i+1]<<8|fbytes[2*i];
#  334|                  s=((s&0xFFFF)^0x8000)-0x8000;
#  335|                  in[i]=s*256;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
opus-1.6/celt/opus_custom_demo.c:335:16: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’
opus-1.6/celt/opus_custom_demo.c:137:7: branch_false: following ‘false’ branch (when ‘argc > 6’)...
opus-1.6/celt/opus_custom_demo.c:142:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:175:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:181:26: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:184:7: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:186:47: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:188:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:196:11: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:233:7: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:234:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:235:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:240:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:240:10: branch_false: following ‘false’ branch (when ‘complexity < 0’)...
opus-1.6/celt/opus_custom_demo.c:248:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:263:7: branch_false: following ‘false’ branch (when ‘encode_only != 0’)...
opus-1.6/celt/opus_custom_demo.c:275:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:275:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:280:17: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:289:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:294:29: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:294:22: acquire_memory: this call could return NULL
opus-1.6/celt/opus_custom_demo.c:298:11: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:301:10: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:301:10: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:326:30: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:327:13: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:329:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:329:13: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/celt/opus_custom_demo.c:329:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:330:21: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:333:25: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:335:16: danger: ‘in + (long unsigned int)i * 4’ could be NULL: unchecked value from [(25)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/24)
#  333|                  s=fbytes[2*i+1]<<8|fbytes[2*i];
#  334|                  s=((s&0xFFFF)^0x8000)-0x8000;
#  335|->                in[i]=s*256;
#  336|               }
#  337|            } else if (format == FORMAT_S24_LE) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
opus-1.6/celt/opus_custom_demo.c:441:16: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fbytes’
opus-1.6/celt/opus_custom_demo.c:137:7: branch_false: following ‘false’ branch (when ‘argc > 6’)...
opus-1.6/celt/opus_custom_demo.c:142:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:175:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:181:26: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:184:7: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:186:47: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:188:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:196:11: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:233:7: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:234:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:235:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:240:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:240:10: branch_false: following ‘false’ branch (when ‘complexity < 0’)...
opus-1.6/celt/opus_custom_demo.c:248:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:263:7: branch_true: following ‘true’ branch (when ‘encode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:264:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:265:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:270:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:270:9: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:275:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:275:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:280:17: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:289:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:294:29: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:296:29: acquire_memory: this call could return NULL
opus-1.6/celt/opus_custom_demo.c:298:11: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:301:10: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:301:10: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:326:30: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:327:13: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:329:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:330:21: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:353:16: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:354:13: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:359:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:363:10: branch_false: following ‘false’ branch (when ‘encode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:406:17: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:406:17: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:412:12: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:417:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:417:13: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
opus-1.6/celt/opus_custom_demo.c:433:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:433:13: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/celt/opus_custom_demo.c:433:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:434:21: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:437:24: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:441:16: danger: ‘fbytes + (sizetype)(i * 2)’ could be NULL: unchecked value from [(29)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/28)
#  439|                  if (s < -0x007fff00) s = -0x007fff00;
#  440|                  s=(s+128)>>8;
#  441|->                fbytes[2*i]=s&0xFF;
#  442|                  fbytes[2*i+1]=(s>>8)&0xFF;
#  443|               }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
opus-1.6/celt/opus_custom_demo.c:451:16: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fbytes’
opus-1.6/celt/opus_custom_demo.c:105:5: enter_function: entry to ‘main’
opus-1.6/celt/opus_custom_demo.c:137:7: branch_false: following ‘false’ branch (when ‘argc > 6’)...
opus-1.6/celt/opus_custom_demo.c:142:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:175:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:181:26: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:184:7: branch_false: following ‘false’ branch (when ‘decode_only != 0’)...
opus-1.6/celt/opus_custom_demo.c:196:11: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:197:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:204:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/celt/opus_custom_demo.c:209:19: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:209:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/celt/opus_custom_demo.c:213:19: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:233:7: branch_false: following ‘false’ branch (when ‘decode_only != 0’)...
opus-1.6/celt/opus_custom_demo.c:263:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:263:7: branch_true: following ‘true’ branch (when ‘encode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:264:13: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:265:10: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:270:10: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:270:9: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:275:8: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:275:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:280:17: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:282:7: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:289:7: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:294:29: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:296:29: acquire_memory: this call could return NULL
opus-1.6/celt/opus_custom_demo.c:298:11: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:301:10: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:301:10: branch_true: following ‘true’ branch (when ‘decode_only != 0’)...
opus-1.6/celt/opus_custom_demo.c:304:29: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:305:14: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:307:17: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/celt/opus_custom_demo.c:308:14: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:313:22: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:314:14: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:316:29: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/celt/opus_custom_demo.c:318:14: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:512:1: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:363:10: branch_false: following ‘false’ branch (when ‘encode_only == 0’)...
opus-1.6/celt/opus_custom_demo.c:406:17: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:406:17: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:412:12: branch_false: following ‘false’ branch...
opus-1.6/celt/opus_custom_demo.c:417:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:417:13: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
opus-1.6/celt/opus_custom_demo.c:433:13: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:433:13: branch_false: following ‘false’ branch (when ‘format != 0’)...
opus-1.6/celt/opus_custom_demo.c:444:20: branch_false: ...to here
opus-1.6/celt/opus_custom_demo.c:444:20: branch_true: following ‘true’ branch (when ‘format == 1’)...
opus-1.6/celt/opus_custom_demo.c:444:20: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:445:21: branch_true: following ‘true’ branch...
opus-1.6/celt/opus_custom_demo.c:448:24: branch_true: ...to here
opus-1.6/celt/opus_custom_demo.c:451:16: danger: ‘fbytes + (sizetype)(i * 3)’ could be NULL: unchecked value from [(28)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/27)
#  449|                  if (s > 0x007fffff) s = 0x007fffff;
#  450|                  if (s < -0x007fffff) s = -0x007fffff;
#  451|->                fbytes[3*i]=s&0xFF;
#  452|                  fbytes[3*i+1]=(s>>8)&0xFF;
#  453|                  fbytes[3*i+2]=(s>>16)&0xFF;

Error: CPPCHECK_WARNING (CWE-457): [#def20]
opus-1.6/celt/rate.c:641: warning[uninitvar]: Uninitialized variable: bits1
#  639|         bits2[j] = bits2j;
#  640|      }
#  641|->    codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thresh, cap,
#  642|            total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_stereo_rsv,
#  643|            pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth);

Error: CPPCHECK_WARNING (CWE-457): [#def21]
opus-1.6/celt/rate.c:641: warning[uninitvar]: Uninitialized variable: bits2
#  639|         bits2[j] = bits2j;
#  640|      }
#  641|->    codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thresh, cap,
#  642|            total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_stereo_rsv,
#  643|            pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth);

Error: CPPCHECK_WARNING (CWE-476): [#def22]
opus-1.6/celt/tests/test_unit_dft.c:110: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  108|   
#  109|       for (k=0;k<nfft;++k) {
#  110|->         in[k].r = (rand() % 32767) - 16384;
#  111|           in[k].i = (rand() % 32767) - 16384;
#  112|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
opus-1.6/celt/tests/test_unit_dft.c:110:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’
opus-1.6/celt/tests/test_unit_dft.c:145:5: enter_function: entry to ‘main’
opus-1.6/celt/tests/test_unit_dft.c:151:8: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
opus-1.6/celt/tests/test_unit_dft.c:158:9: branch_false: ...to here
opus-1.6/celt/tests/test_unit_dft.c:158:9: call_function: calling ‘test1d’ from ‘main’
#  108|   
#  109|       for (k=0;k<nfft;++k) {
#  110|->         in[k].r = (rand() % 32767) - 16384;
#  111|           in[k].i = (rand() % 32767) - 16384;
#  112|       }

Error: CPPCHECK_WARNING (CWE-476): [#def24]
opus-1.6/celt/tests/test_unit_dft.c:111: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  109|       for (k=0;k<nfft;++k) {
#  110|           in[k].r = (rand() % 32767) - 16384;
#  111|->         in[k].i = (rand() % 32767) - 16384;
#  112|       }
#  113|   

Error: CPPCHECK_WARNING (CWE-476): [#def25]
opus-1.6/celt/tests/test_unit_dft.c:115: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  113|   
#  114|       for (k=0;k<nfft;++k) {
#  115|->        in[k].r *= 32768;
#  116|          in[k].i *= 32768;
#  117|       }

Error: CPPCHECK_WARNING (CWE-476): [#def26]
opus-1.6/celt/tests/test_unit_dft.c:116: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  114|       for (k=0;k<nfft;++k) {
#  115|          in[k].r *= 32768;
#  116|->        in[k].i *= 32768;
#  117|       }
#  118|   

Error: CPPCHECK_WARNING (CWE-476): [#def27]
opus-1.6/celt/tests/test_unit_entropy.c:181: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tell
#  179|       ec_enc_init(&enc,ptr,DATA_SIZE2);
#  180|       zeros = rand()%13==0;
#  181|->     tell[0]=ec_tell_frac(&enc);
#  182|       for(j=0;j<sz;j++){
#  183|         if (zeros)

Error: CPPCHECK_WARNING (CWE-476): [#def28]
opus-1.6/celt/tests/test_unit_entropy.c:187: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  185|         else
#  186|           data[j]=rand()%ft;
#  187|->       ec_enc_uint(&enc,data[j],ft);
#  188|         tell[j+1]=ec_tell_frac(&enc);
#  189|       }

Error: CPPCHECK_WARNING (CWE-476): [#def29]
opus-1.6/celt/tests/test_unit_entropy.c:188: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tell
#  186|           data[j]=rand()%ft;
#  187|         ec_enc_uint(&enc,data[j],ft);
#  188|->       tell[j+1]=ec_tell_frac(&enc);
#  189|       }
#  190|       if (rand()%2==0)

Error: CPPCHECK_WARNING (CWE-476): [#def30]
opus-1.6/celt/tests/test_unit_entropy.c:242: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tell
#  240|       enc_method=(unsigned *)malloc(sz*sizeof(*enc_method));
#  241|       ec_enc_init(&enc,ptr,DATA_SIZE2);
#  242|->     tell[0]=ec_tell_frac(&enc);
#  243|       for(j=0;j<sz;j++){
#  244|         data[j]=rand()/((RAND_MAX>>1)+1);

Error: CPPCHECK_WARNING (CWE-476): [#def31]
opus-1.6/celt/tests/test_unit_entropy.c:244: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  242|       tell[0]=ec_tell_frac(&enc);
#  243|       for(j=0;j<sz;j++){
#  244|->       data[j]=rand()/((RAND_MAX>>1)+1);
#  245|         logp1[j]=(rand()%15)+1;
#  246|         enc_method[j]=rand()/((RAND_MAX>>2)+1);

Error: CPPCHECK_WARNING (CWE-476): [#def32]
opus-1.6/celt/tests/test_unit_entropy.c:245: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: logp1
#  243|       for(j=0;j<sz;j++){
#  244|         data[j]=rand()/((RAND_MAX>>1)+1);
#  245|->       logp1[j]=(rand()%15)+1;
#  246|         enc_method[j]=rand()/((RAND_MAX>>2)+1);
#  247|         switch(enc_method[j]){

Error: CPPCHECK_WARNING (CWE-476): [#def33]
opus-1.6/celt/tests/test_unit_entropy.c:246: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: enc_method
#  244|         data[j]=rand()/((RAND_MAX>>1)+1);
#  245|         logp1[j]=(rand()%15)+1;
#  246|->       enc_method[j]=rand()/((RAND_MAX>>2)+1);
#  247|         switch(enc_method[j]){
#  248|           case 0:{

Error: CPPCHECK_WARNING (CWE-476): [#def34]
opus-1.6/celt/tests/test_unit_entropy.c:247: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: enc_method
#  245|         logp1[j]=(rand()%15)+1;
#  246|         enc_method[j]=rand()/((RAND_MAX>>2)+1);
#  247|->       switch(enc_method[j]){
#  248|           case 0:{
#  249|             ec_encode(&enc,data[j]?(1<<logp1[j])-1:0,

Error: COMPILER_WARNING (CWE-457): [#def35]
opus-1.6/celt/tests/test_unit_mdct.c: scope_hint: In function 'test1d.isra'
opus-1.6/celt/tests/test_unit_mdct.c:118:17: warning[-Wmaybe-uninitialized]: '_cfg.trig' may be used uninitialized
#  118 |     mdct_lookup _cfg;
#      |                 ^
#  116|       int shift = 0;
#  117|       const mdct_lookup *cfg;
#  118|->     mdct_lookup _cfg;
#  119|       clt_mdct_init(&_cfg, nfft, 0, arch);
#  120|       cfg = &_cfg;

Error: CPPCHECK_WARNING (CWE-476): [#def36]
opus-1.6/celt/tests/test_unit_mdct.c:139: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  137|   
#  138|       for (k=0;k<nfft;++k) {
#  139|->         in[k] = (rand() % 32768) - 16384;
#  140|       }
#  141|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
opus-1.6/celt/tests/test_unit_mdct.c:139:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’
opus-1.6/celt/tests/test_unit_mdct.c:189:5: enter_function: entry to ‘main’
opus-1.6/celt/tests/test_unit_mdct.c:195:8: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
opus-1.6/celt/tests/test_unit_mdct.c:202:9: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mdct.c:202:9: call_function: calling ‘test1d’ from ‘main’
#  137|   
#  138|       for (k=0;k<nfft;++k) {
#  139|->         in[k] = (rand() % 32768) - 16384;
#  140|       }
#  141|   

Error: CPPCHECK_WARNING (CWE-476): [#def38]
opus-1.6/celt/tests/test_unit_mdct.c:146: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: window
#  144|          window[k] = Q31ONE;
#  145|   #else
#  146|->        window[k] = Q15ONE;
#  147|   #endif
#  148|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
opus-1.6/celt/tests/test_unit_mdct.c:146:8: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘window’
opus-1.6/celt/tests/test_unit_mdct.c:189:5: enter_function: entry to ‘main’
opus-1.6/celt/tests/test_unit_mdct.c:195:8: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
opus-1.6/celt/tests/test_unit_mdct.c:202:9: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mdct.c:202:9: call_function: calling ‘test1d’ from ‘main’
#  144|          window[k] = Q31ONE;
#  145|   #else
#  146|->        window[k] = Q15ONE;
#  147|   #endif
#  148|       }

Error: CPPCHECK_WARNING (CWE-476): [#def40]
opus-1.6/celt/tests/test_unit_mdct.c:150: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  148|       }
#  149|       for (k=0;k<nfft;++k) {
#  150|->        in[k] *= 32768;
#  151|       }
#  152|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
opus-1.6/celt/tests/test_unit_mdct.c:161:8: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in_copy’
opus-1.6/celt/tests/test_unit_mdct.c:189:5: enter_function: entry to ‘main’
opus-1.6/celt/tests/test_unit_mdct.c:195:8: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
opus-1.6/celt/tests/test_unit_mdct.c:202:9: branch_false: ...to here
opus-1.6/celt/tests/test_unit_mdct.c:202:9: call_function: calling ‘test1d’ from ‘main’
#  159|   
#  160|       for (k=0;k<nfft;++k)
#  161|->        in_copy[k] = in[k];
#  162|       /*for (k=0;k<nfft;++k) printf("%d %d ", in[k].r, in[k].i);printf("\n");*/
#  163|   

Error: CPPCHECK_WARNING (CWE-476): [#def42]
opus-1.6/celt/tests/test_unit_mini_kfft.c:98: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#   96|   
#   97|       for (k=0;k<nfft;++k) {
#   98|->         in[k].r = (rand() % 32767) - 16384;
#   99|           in[k].i = (rand() % 32767) - 16384;
#  100|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
opus-1.6/celt/tests/test_unit_mini_kfft.c:98:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’
opus-1.6/celt/tests/test_unit_mini_kfft.c:83:6: enter_function: entry to ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:91:11: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: call_function: calling ‘mini_kiss_fft_alloc’ from ‘test1d’
opus-1.6/celt/tests/test_unit_mini_kfft.c:92:12: return_function: returning to ‘test1d’ from ‘mini_kiss_fft_alloc’
opus-1.6/celt/tests/test_unit_mini_kfft.c:94:30: acquire_memory: this call could return NULL
opus-1.6/celt/tests/test_unit_mini_kfft.c:97:14: branch_true: following ‘true’ branch (when ‘k < nfft’)...
opus-1.6/celt/tests/test_unit_mini_kfft.c:98:20: branch_true: ...to here
opus-1.6/celt/tests/test_unit_mini_kfft.c:98:9: danger: ‘in + (long unsigned int)k * 8’ could be NULL: unchecked value from [(16)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/15)
#   96|   
#   97|       for (k=0;k<nfft;++k) {
#   98|->         in[k].r = (rand() % 32767) - 16384;
#   99|           in[k].i = (rand() % 32767) - 16384;
#  100|       }

Error: CPPCHECK_WARNING (CWE-476): [#def44]
opus-1.6/celt/tests/test_unit_mini_kfft.c:99: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#   97|       for (k=0;k<nfft;++k) {
#   98|           in[k].r = (rand() % 32767) - 16384;
#   99|->         in[k].i = (rand() % 32767) - 16384;
#  100|       }
#  101|   

Error: CPPCHECK_WARNING (CWE-476): [#def45]
opus-1.6/celt/tests/test_unit_mini_kfft.c:103: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  101|   
#  102|       for (k=0;k<nfft;++k) {
#  103|->        in[k].r *= 32768;
#  104|          in[k].i *= 32768;
#  105|       }

Error: CPPCHECK_WARNING (CWE-476): [#def46]
opus-1.6/celt/tests/test_unit_mini_kfft.c:104: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  102|       for (k=0;k<nfft;++k) {
#  103|          in[k].r *= 32768;
#  104|->        in[k].i *= 32768;
#  105|       }
#  106|   

Error: CPPCHECK_WARNING (CWE-476): [#def47]
opus-1.6/celt/tests/test_unit_mini_kfft.c:110: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  108|       {
#  109|          for (k=0;k<nfft;++k) {
#  110|->           in[k].r /= nfft;
#  111|             in[k].i /= nfft;
#  112|          }

Error: CPPCHECK_WARNING (CWE-476): [#def48]
opus-1.6/celt/tests/test_unit_mini_kfft.c:111: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: in
#  109|          for (k=0;k<nfft;++k) {
#  110|             in[k].r /= nfft;
#  111|->           in[k].i /= nfft;
#  112|          }
#  113|       }

Error: COMPILER_WARNING: [#def49]
opus-1.6/celt/x86/pitch_avx.c:42:61: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI
#   40|   {
#   41|       __m256 xsum0, xsum1, xsum2, xsum3, xsum4, xsum5, xsum6, xsum7;
#   42|->     xsum7 = xsum6 = xsum5 = xsum4 = xsum3 = xsum2 = xsum1 = xsum0 = _mm256_setzero_ps();
#   43|       int i;
#   44|       __m256 x0;

Error: COMPILER_WARNING: [#def50]
opus-1.6/celt/x86/pitch_avx.c:42:69: note[note]: called from here
#   40|   {
#   41|       __m256 xsum0, xsum1, xsum2, xsum3, xsum4, xsum5, xsum6, xsum7;
#   42|->     xsum7 = xsum6 = xsum5 = xsum4 = xsum3 = xsum2 = xsum1 = xsum0 = _mm256_setzero_ps();
#   43|       int i;
#   44|       __m256 x0;

Error: COMPILER_WARNING: [#def51]
opus-1.6/celt/x86/pitch_avx.c:48:14: note[note]: called from here
#   46|       for (i=0;i<len-7;i+=8)
#   47|       {
#   48|->         x0 = _mm256_loadu_ps(x+i);
#   49|           xsum0 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i  ), xsum0);
#   50|           xsum1 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+1), xsum1);

Error: COMPILER_WARNING: [#def52]
opus-1.6/celt/x86/pitch_avx.c:49:17: note[note]: called from here
#   47|       {
#   48|           x0 = _mm256_loadu_ps(x+i);
#   49|->         xsum0 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i  ), xsum0);
#   50|           xsum1 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+1), xsum1);
#   51|           xsum2 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+2), xsum2);

Error: COMPILER_WARNING: [#def53]
opus-1.6/celt/x86/pitch_avx.c:50:17: note[note]: called from here
#   48|           x0 = _mm256_loadu_ps(x+i);
#   49|           xsum0 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i  ), xsum0);
#   50|->         xsum1 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+1), xsum1);
#   51|           xsum2 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+2), xsum2);
#   52|           xsum3 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+3), xsum3);

Error: COMPILER_WARNING: [#def54]
opus-1.6/celt/x86/pitch_avx.c:51:17: note[note]: called from here
#   49|           xsum0 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i  ), xsum0);
#   50|           xsum1 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+1), xsum1);
#   51|->         xsum2 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+2), xsum2);
#   52|           xsum3 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+3), xsum3);
#   53|           xsum4 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+4), xsum4);

Error: COMPILER_WARNING: [#def55]
opus-1.6/celt/x86/pitch_avx.c:52:17: note[note]: called from here
#   50|           xsum1 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+1), xsum1);
#   51|           xsum2 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+2), xsum2);
#   52|->         xsum3 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+3), xsum3);
#   53|           xsum4 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+4), xsum4);
#   54|           xsum5 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+5), xsum5);

Error: COMPILER_WARNING: [#def56]
opus-1.6/celt/x86/pitch_avx.c:53:17: note[note]: called from here
#   51|           xsum2 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+2), xsum2);
#   52|           xsum3 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+3), xsum3);
#   53|->         xsum4 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+4), xsum4);
#   54|           xsum5 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+5), xsum5);
#   55|           xsum6 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+6), xsum6);

Error: COMPILER_WARNING: [#def57]
opus-1.6/celt/x86/pitch_avx.c:54:17: note[note]: called from here
#   52|           xsum3 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+3), xsum3);
#   53|           xsum4 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+4), xsum4);
#   54|->         xsum5 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+5), xsum5);
#   55|           xsum6 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+6), xsum6);
#   56|           xsum7 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+7), xsum7);

Error: COMPILER_WARNING: [#def58]
opus-1.6/celt/x86/pitch_avx.c:55:17: note[note]: called from here
#   53|           xsum4 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+4), xsum4);
#   54|           xsum5 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+5), xsum5);
#   55|->         xsum6 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+6), xsum6);
#   56|           xsum7 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+7), xsum7);
#   57|       }

Error: COMPILER_WARNING: [#def59]
opus-1.6/celt/x86/pitch_avx.c:56:17: note[note]: called from here
#   54|           xsum5 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+5), xsum5);
#   55|           xsum6 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+6), xsum6);
#   56|->         xsum7 = _mm256_fmadd_ps(x0, _mm256_loadu_ps(y+i+7), xsum7);
#   57|       }
#   58|       if (i != len) {

Error: COMPILER_WARNING: [#def60]
opus-1.6/celt/x86/pitch_avx.c:61:13: note[note]: called from here
#   59|           static const int mask[15] = {-1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0};
#   60|           __m256i m;
#   61|->         m = _mm256_loadu_si256((__m256i*)(void*)(mask + 7+i-len));
#   62|           x0 = _mm256_maskload_ps(x+i, m);
#   63|           xsum0 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i  , m), xsum0);

Error: COMPILER_WARNING: [#def61]
opus-1.6/celt/x86/pitch_avx.c:62:14: note[note]: called from here
#   60|           __m256i m;
#   61|           m = _mm256_loadu_si256((__m256i*)(void*)(mask + 7+i-len));
#   62|->         x0 = _mm256_maskload_ps(x+i, m);
#   63|           xsum0 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i  , m), xsum0);
#   64|           xsum1 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+1, m), xsum1);

Error: COMPILER_WARNING: [#def62]
opus-1.6/celt/x86/pitch_avx.c:63:17: note[note]: called from here
#   61|           m = _mm256_loadu_si256((__m256i*)(void*)(mask + 7+i-len));
#   62|           x0 = _mm256_maskload_ps(x+i, m);
#   63|->         xsum0 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i  , m), xsum0);
#   64|           xsum1 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+1, m), xsum1);
#   65|           xsum2 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+2, m), xsum2);

Error: COMPILER_WARNING: [#def63]
opus-1.6/celt/x86/pitch_avx.c:64:17: note[note]: called from here
#   62|           x0 = _mm256_maskload_ps(x+i, m);
#   63|           xsum0 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i  , m), xsum0);
#   64|->         xsum1 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+1, m), xsum1);
#   65|           xsum2 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+2, m), xsum2);
#   66|           xsum3 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+3, m), xsum3);

Error: COMPILER_WARNING: [#def64]
opus-1.6/celt/x86/pitch_avx.c:65:17: note[note]: called from here
#   63|           xsum0 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i  , m), xsum0);
#   64|           xsum1 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+1, m), xsum1);
#   65|->         xsum2 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+2, m), xsum2);
#   66|           xsum3 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+3, m), xsum3);
#   67|           xsum4 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+4, m), xsum4);

Error: COMPILER_WARNING: [#def65]
opus-1.6/celt/x86/pitch_avx.c:66:17: note[note]: called from here
#   64|           xsum1 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+1, m), xsum1);
#   65|           xsum2 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+2, m), xsum2);
#   66|->         xsum3 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+3, m), xsum3);
#   67|           xsum4 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+4, m), xsum4);
#   68|           xsum5 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+5, m), xsum5);

Error: COMPILER_WARNING: [#def66]
opus-1.6/celt/x86/pitch_avx.c:67:17: note[note]: called from here
#   65|           xsum2 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+2, m), xsum2);
#   66|           xsum3 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+3, m), xsum3);
#   67|->         xsum4 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+4, m), xsum4);
#   68|           xsum5 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+5, m), xsum5);
#   69|           xsum6 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+6, m), xsum6);

Error: COMPILER_WARNING: [#def67]
opus-1.6/celt/x86/pitch_avx.c:68:17: note[note]: called from here
#   66|           xsum3 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+3, m), xsum3);
#   67|           xsum4 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+4, m), xsum4);
#   68|->         xsum5 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+5, m), xsum5);
#   69|           xsum6 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+6, m), xsum6);
#   70|           xsum7 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+7, m), xsum7);

Error: COMPILER_WARNING: [#def68]
opus-1.6/celt/x86/pitch_avx.c:69:17: note[note]: called from here
#   67|           xsum4 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+4, m), xsum4);
#   68|           xsum5 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+5, m), xsum5);
#   69|->         xsum6 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+6, m), xsum6);
#   70|           xsum7 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+7, m), xsum7);
#   71|       }

Error: COMPILER_WARNING: [#def69]
opus-1.6/celt/x86/pitch_avx.c:70:17: note[note]: called from here
#   68|           xsum5 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+5, m), xsum5);
#   69|           xsum6 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+6, m), xsum6);
#   70|->         xsum7 = _mm256_fmadd_ps(x0, _mm256_maskload_ps(y+i+7, m), xsum7);
#   71|       }
#   72|       /* 8 horizontal adds. */

Error: COMPILER_WARNING: [#def70]
opus-1.6/celt/x86/pitch_avx.c:74:13: note[note]: called from here
#   72|       /* 8 horizontal adds. */
#   73|       /* Compute [0 4] [1 5] [2 6] [3 7] */
#   74|->     xsum0 = _mm256_add_ps(_mm256_permute2f128_ps(xsum0, xsum4, 2<<4), _mm256_permute2f128_ps(xsum0, xsum4, 1 | (3<<4)));
#   75|       xsum1 = _mm256_add_ps(_mm256_permute2f128_ps(xsum1, xsum5, 2<<4), _mm256_permute2f128_ps(xsum1, xsum5, 1 | (3<<4)));
#   76|       xsum2 = _mm256_add_ps(_mm256_permute2f128_ps(xsum2, xsum6, 2<<4), _mm256_permute2f128_ps(xsum2, xsum6, 1 | (3<<4)));

Error: COMPILER_WARNING: [#def71]
opus-1.6/celt/x86/pitch_avx.c:75:13: note[note]: called from here
#   73|       /* Compute [0 4] [1 5] [2 6] [3 7] */
#   74|       xsum0 = _mm256_add_ps(_mm256_permute2f128_ps(xsum0, xsum4, 2<<4), _mm256_permute2f128_ps(xsum0, xsum4, 1 | (3<<4)));
#   75|->     xsum1 = _mm256_add_ps(_mm256_permute2f128_ps(xsum1, xsum5, 2<<4), _mm256_permute2f128_ps(xsum1, xsum5, 1 | (3<<4)));
#   76|       xsum2 = _mm256_add_ps(_mm256_permute2f128_ps(xsum2, xsum6, 2<<4), _mm256_permute2f128_ps(xsum2, xsum6, 1 | (3<<4)));
#   77|       xsum3 = _mm256_add_ps(_mm256_permute2f128_ps(xsum3, xsum7, 2<<4), _mm256_permute2f128_ps(xsum3, xsum7, 1 | (3<<4)));

Error: COMPILER_WARNING: [#def72]
opus-1.6/celt/x86/pitch_avx.c:76:13: note[note]: called from here
#   74|       xsum0 = _mm256_add_ps(_mm256_permute2f128_ps(xsum0, xsum4, 2<<4), _mm256_permute2f128_ps(xsum0, xsum4, 1 | (3<<4)));
#   75|       xsum1 = _mm256_add_ps(_mm256_permute2f128_ps(xsum1, xsum5, 2<<4), _mm256_permute2f128_ps(xsum1, xsum5, 1 | (3<<4)));
#   76|->     xsum2 = _mm256_add_ps(_mm256_permute2f128_ps(xsum2, xsum6, 2<<4), _mm256_permute2f128_ps(xsum2, xsum6, 1 | (3<<4)));
#   77|       xsum3 = _mm256_add_ps(_mm256_permute2f128_ps(xsum3, xsum7, 2<<4), _mm256_permute2f128_ps(xsum3, xsum7, 1 | (3<<4)));
#   78|       /* Compute [0 1 4 5] [2 3 6 7] */

Error: COMPILER_WARNING: [#def73]
opus-1.6/celt/x86/pitch_avx.c:77:13: note[note]: called from here
#   75|       xsum1 = _mm256_add_ps(_mm256_permute2f128_ps(xsum1, xsum5, 2<<4), _mm256_permute2f128_ps(xsum1, xsum5, 1 | (3<<4)));
#   76|       xsum2 = _mm256_add_ps(_mm256_permute2f128_ps(xsum2, xsum6, 2<<4), _mm256_permute2f128_ps(xsum2, xsum6, 1 | (3<<4)));
#   77|->     xsum3 = _mm256_add_ps(_mm256_permute2f128_ps(xsum3, xsum7, 2<<4), _mm256_permute2f128_ps(xsum3, xsum7, 1 | (3<<4)));
#   78|       /* Compute [0 1 4 5] [2 3 6 7] */
#   79|       xsum0 = _mm256_hadd_ps(xsum0, xsum1);

Error: COMPILER_WARNING: [#def74]
opus-1.6/celt/x86/pitch_avx.c:79:13: note[note]: called from here
#   77|       xsum3 = _mm256_add_ps(_mm256_permute2f128_ps(xsum3, xsum7, 2<<4), _mm256_permute2f128_ps(xsum3, xsum7, 1 | (3<<4)));
#   78|       /* Compute [0 1 4 5] [2 3 6 7] */
#   79|->     xsum0 = _mm256_hadd_ps(xsum0, xsum1);
#   80|       xsum1 = _mm256_hadd_ps(xsum2, xsum3);
#   81|       /* Compute [0 1 2 3 4 5 6 7] */

Error: COMPILER_WARNING: [#def75]
opus-1.6/celt/x86/pitch_avx.c:80:13: note[note]: called from here
#   78|       /* Compute [0 1 4 5] [2 3 6 7] */
#   79|       xsum0 = _mm256_hadd_ps(xsum0, xsum1);
#   80|->     xsum1 = _mm256_hadd_ps(xsum2, xsum3);
#   81|       /* Compute [0 1 2 3 4 5 6 7] */
#   82|       xsum0 = _mm256_hadd_ps(xsum0, xsum1);

Error: COMPILER_WARNING: [#def76]
opus-1.6/celt/x86/pitch_avx.c:82:13: note[note]: called from here
#   80|       xsum1 = _mm256_hadd_ps(xsum2, xsum3);
#   81|       /* Compute [0 1 2 3 4 5 6 7] */
#   82|->     xsum0 = _mm256_hadd_ps(xsum0, xsum1);
#   83|       _mm256_storeu_ps(sum, xsum0);
#   84|   }

Error: COMPILER_WARNING: [#def77]
opus-1.6/celt/x86/pitch_avx.c:83:5: note[note]: called from here
#   81|       /* Compute [0 1 2 3 4 5 6 7] */
#   82|       xsum0 = _mm256_hadd_ps(xsum0, xsum1);
#   83|->     _mm256_storeu_ps(sum, xsum0);
#   84|   }
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
opus-1.6/doc/trivial_example.c:98:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(inFile, "rb")’
opus-1.6/doc/trivial_example.c:63:7: branch_false: following ‘false’ branch (when ‘argc == 3’)...
opus-1.6/doc/trivial_example.c:71:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:72:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:81:10: branch_false: ...to here
opus-1.6/doc/trivial_example.c:82:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:87:4: branch_false: ...to here
opus-1.6/doc/trivial_example.c:88:10: acquire_resource: opened here
opus-1.6/doc/trivial_example.c:89:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:97:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:98:8: danger: ‘fopen(inFile, "rb")’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   96|      /* Create a new decoder state. */
#   97|      decoder = opus_decoder_create(SAMPLE_RATE, CHANNELS, &err);
#   98|->    if (err<0)
#   99|      {
#  100|         fprintf(stderr, "failed to create decoder: %s\n", opus_strerror(err));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
opus-1.6/doc/trivial_example.c:98:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(inFile, "rb")’
opus-1.6/doc/trivial_example.c:63:7: branch_false: following ‘false’ branch (when ‘argc == 3’)...
opus-1.6/doc/trivial_example.c:71:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:72:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:81:10: branch_false: ...to here
opus-1.6/doc/trivial_example.c:82:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:87:4: branch_false: ...to here
opus-1.6/doc/trivial_example.c:88:10: acquire_memory: allocated here
opus-1.6/doc/trivial_example.c:89:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:97:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:98:8: danger: ‘fopen(inFile, "rb")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   96|      /* Create a new decoder state. */
#   97|      decoder = opus_decoder_create(SAMPLE_RATE, CHANNELS, &err);
#   98|->    if (err<0)
#   99|      {
#  100|         fprintf(stderr, "failed to create decoder: %s\n", opus_strerror(err));

Error: CPPCHECK_WARNING (CWE-404): [#def80]
opus-1.6/doc/trivial_example.c:101: error[resourceLeak]: Resource leak: fin
#   99|      {
#  100|         fprintf(stderr, "failed to create decoder: %s\n", opus_strerror(err));
#  101|->       return EXIT_FAILURE;
#  102|      }
#  103|      outFile = argv[2];

Error: CPPCHECK_WARNING (CWE-404): [#def81]
opus-1.6/doc/trivial_example.c:108: error[resourceLeak]: Resource leak: fin
#  106|      {
#  107|         fprintf(stderr, "failed to open output file: %s\n", strerror(errno));
#  108|->       return EXIT_FAILURE;
#  109|      }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
opus-1.6/doc/trivial_example.c:133:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(outFile, "wb")’
opus-1.6/doc/trivial_example.c:63:7: branch_false: following ‘false’ branch (when ‘argc == 3’)...
opus-1.6/doc/trivial_example.c:71:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:72:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:81:10: branch_false: ...to here
opus-1.6/doc/trivial_example.c:82:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:87:4: branch_false: ...to here
opus-1.6/doc/trivial_example.c:89:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:97:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:98:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:103:4: branch_false: ...to here
opus-1.6/doc/trivial_example.c:104:11: acquire_resource: opened here
opus-1.6/doc/trivial_example.c:105:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:105:7: branch_false: ...to here
opus-1.6/doc/trivial_example.c:125:10: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:125:10: branch_false: ...to here
opus-1.6/doc/trivial_example.c:131:16: branch_true: following ‘true’ branch (when ‘i != 1920’)...
opus-1.6/doc/trivial_example.c:133:26: branch_true: ...to here
opus-1.6/doc/trivial_example.c:133:26: danger: ‘fopen(outFile, "wb")’ leaks here; was opened at [(11)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/10)
#  131|         for (i=0;i<CHANNELS*FRAME_SIZE;i++)
#  132|         {
#  133|->          in[i]=pcm_bytes[2*i+1]<<8|pcm_bytes[2*i];
#  134|         }
#  135|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
opus-1.6/doc/trivial_example.c:133:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(outFile, "wb")’
opus-1.6/doc/trivial_example.c:63:7: branch_false: following ‘false’ branch (when ‘argc == 3’)...
opus-1.6/doc/trivial_example.c:71:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:72:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:81:10: branch_false: ...to here
opus-1.6/doc/trivial_example.c:82:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:87:4: branch_false: ...to here
opus-1.6/doc/trivial_example.c:89:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:97:14: branch_false: ...to here
opus-1.6/doc/trivial_example.c:98:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:103:4: branch_false: ...to here
opus-1.6/doc/trivial_example.c:104:11: acquire_memory: allocated here
opus-1.6/doc/trivial_example.c:105:7: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:105:7: branch_false: ...to here
opus-1.6/doc/trivial_example.c:125:10: branch_false: following ‘false’ branch...
opus-1.6/doc/trivial_example.c:125:10: branch_false: ...to here
opus-1.6/doc/trivial_example.c:131:16: branch_true: following ‘true’ branch (when ‘i != 1920’)...
opus-1.6/doc/trivial_example.c:133:26: branch_true: ...to here
opus-1.6/doc/trivial_example.c:133:26: danger: ‘fopen(outFile, "wb")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/10)
#  131|         for (i=0;i<CHANNELS*FRAME_SIZE;i++)
#  132|         {
#  133|->          in[i]=pcm_bytes[2*i+1]<<8|pcm_bytes[2*i];
#  134|         }
#  135|   

Error: CPPCHECK_WARNING (CWE-457): [#def84]
opus-1.6/silk/NLSF2A.c:116: warning[uninitvar]: Uninitialized variable: cos_LSF_QA
#  114|   
#  115|       /* generate even and odd polynomials using convolution */
#  116|->     silk_NLSF2A_find_poly( P, &cos_LSF_QA[ 0 ], dd );
#  117|       silk_NLSF2A_find_poly( Q, &cos_LSF_QA[ 1 ], dd );
#  118|   

Error: GCC_ANALYZER_WARNING: [#def85]
opus-1.6/silk/NSQ_del_dec.c:605:13: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to 'memcpy'
opus-1.6/silk/NSQ_del_dec.c:361:5: branch_false: following 'false' branch (when 'nStatesDelayedDecision > 0')...
opus-1.6/silk/NSQ_del_dec.c:362:5: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:372:17: branch_true: following 'true' branch (when 'i < length')...
opus-1.6/silk/NSQ_del_dec.c:376:11: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:402:21: branch_true: following 'true' branch (when 'k < nStatesDelayedDecision')...
opus-1.6/silk/NSQ_del_dec.c:404:29: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:419:13: branch_false: following 'false' branch...
opus-1.6/silk/NSQ_del_dec.c:421:20: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:467:16: branch_true: following 'true' branch (when 'Lambda_Q10 > 2048')...
opus-1.6/silk/NSQ_del_dec.c:469:34: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:472:27: branch_false: following 'false' branch...
opus-1.6/silk/NSQ_del_dec.c:474:27: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:555:38: branch_true: following 'true' branch...
opus-1.6/silk/NSQ_del_dec.c:577:21: branch_true: following 'true' branch (when 'k < nStatesDelayedDecision')...
opus-1.6/silk/NSQ_del_dec.c:578:25: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:578:15: branch_false: following 'false' branch...
opus-1.6/silk/NSQ_del_dec.c:577:49: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:590:21: branch_false: following 'false' branch (when 'k >= nStatesDelayedDecision')...
opus-1.6/silk/NSQ_del_dec.c:604:11: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:604:11: branch_true: following 'true' branch (when 'RDmin_Q10 < RDmax_Q10')...
opus-1.6/silk/NSQ_del_dec.c:605:13: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:605:13: danger: overlapping buffers passed as arguments to 'memcpy'
#  603|           /* Replace a state if best from second set outperforms worst in first set */
#  604|           if( RDmin_Q10 < RDmax_Q10 ) {
#  605|->             silk_memcpy( ( (opus_int32 *)&psDelDec[ RDmax_ind ] ) + i,
#  606|                            ( (opus_int32 *)&psDelDec[ RDmin_ind ] ) + i, sizeof( NSQ_del_dec_struct ) - i * sizeof( opus_int32) );
#  607|               silk_memcpy( &psSampleState[ RDmax_ind ][ 0 ], &psSampleState[ RDmin_ind ][ 1 ], sizeof( NSQ_sample_struct ) );

Error: GCC_ANALYZER_WARNING: [#def86]
opus-1.6/silk/NSQ_del_dec.c:607:13: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to 'memcpy'
opus-1.6/silk/NSQ_del_dec.c:361:5: branch_false: following 'false' branch (when 'nStatesDelayedDecision > 0')...
opus-1.6/silk/NSQ_del_dec.c:362:5: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:372:17: branch_true: following 'true' branch (when 'i < length')...
opus-1.6/silk/NSQ_del_dec.c:376:11: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:402:21: branch_true: following 'true' branch (when 'k < nStatesDelayedDecision')...
opus-1.6/silk/NSQ_del_dec.c:404:29: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:419:13: branch_false: following 'false' branch...
opus-1.6/silk/NSQ_del_dec.c:421:20: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:467:16: branch_true: following 'true' branch (when 'Lambda_Q10 > 2048')...
opus-1.6/silk/NSQ_del_dec.c:469:34: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:472:27: branch_false: following 'false' branch...
opus-1.6/silk/NSQ_del_dec.c:474:27: branch_false: ...to here
opus-1.6/silk/NSQ_del_dec.c:555:38: branch_true: following 'true' branch...
opus-1.6/silk/NSQ_del_dec.c:577:21: branch_true: following 'true' branch (when 'k < nStatesDelayedDecision')...
opus-1.6/silk/NSQ_del_dec.c:578:25: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:590:21: branch_true: following 'true' branch (when 'k < nStatesDelayedDecision')...
opus-1.6/silk/NSQ_del_dec.c:592:17: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:597:15: branch_true: following 'true' branch...
opus-1.6/silk/NSQ_del_dec.c:597:15: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:604:11: branch_true: following 'true' branch (when 'RDmin_Q10 < RDmax_Q10')...
opus-1.6/silk/NSQ_del_dec.c:605:13: branch_true: ...to here
opus-1.6/silk/NSQ_del_dec.c:607:13: danger: overlapping buffers passed as arguments to 'memcpy'
#  605|               silk_memcpy( ( (opus_int32 *)&psDelDec[ RDmax_ind ] ) + i,
#  606|                            ( (opus_int32 *)&psDelDec[ RDmin_ind ] ) + i, sizeof( NSQ_del_dec_struct ) - i * sizeof( opus_int32) );
#  607|->             silk_memcpy( &psSampleState[ RDmax_ind ][ 0 ], &psSampleState[ RDmin_ind ][ 1 ], sizeof( NSQ_sample_struct ) );
#  608|           }
#  609|   

Error: CPPCHECK_WARNING (CWE-457): [#def87]
opus-1.6/silk/PLC.c:211: warning[uninitvar]: Uninitialized variable: exc_buf
#  209|       }
#  210|       /* Find the subframe with lowest energy of the last two and use that as random noise generator */
#  211|->     silk_sum_sqr_shift( energy1, shift1, exc_buf,                  subfr_length );
#  212|       silk_sum_sqr_shift( energy2, shift2, &exc_buf[ subfr_length ], subfr_length );
#  213|       RESTORE_STACK;

Error: COMPILER_WARNING (CWE-457): [#def88]
opus-1.6/silk/dec_API.c: scope_hint: In function 'silk_Decode.isra'
opus-1.6/silk/dec_API.c:364:13: warning[-Wmaybe-uninitialized]: 'nSamplesOutDec' may be used uninitialized
#  364 |             silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) );
#      |             ^
opus-1.6/silk/dec_API.c:150:16: note: 'nSamplesOutDec' was declared here
#  150 |     opus_int32 nSamplesOutDec, LBRR_symbol;
#      |                ^
#  362|                   arch);
#  363|           } else {
#  364|->             silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) );
#  365|           }
#  366|           channel_state[ n ].nFramesDecoded++;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def89]
opus-1.6/silk/decode_core.c:185:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*pred_lag_ptr'
opus-1.6/silk/decode_core.c:103:17: branch_true: following 'true' branch...
opus-1.6/silk/decode_core.c:105:42: branch_true: ...to here
opus-1.6/silk/decode_core.c:116:11: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:129:9: branch_false: ...to here
opus-1.6/silk/decode_core.c:142:11: branch_true: following 'true' branch (when 'signalType == 2')...
opus-1.6/silk/decode_core.c:144:13: branch_true: ...to here
opus-1.6/silk/decode_core.c:147:15: branch_true: following 'true' branch (when 'k == 0')...
opus-1.6/silk/decode_core.c:149:29: branch_true: ...to here
opus-1.6/silk/decode_core.c:150:17: branch_false: following 'false' branch (when 'start_idx > 0')...
opus-1.6/silk/decode_core.c:152:19: branch_false: ...to here
opus-1.6/silk/decode_core.c:152:19: branch_false: following 'false' branch (when 'k != 2')...
opus-1.6/silk/decode_core.c:157:63: branch_false: ...to here
opus-1.6/silk/decode_core.c:160:19: branch_true: following 'true' branch (when 'k == 0')...
opus-1.6/silk/decode_core.c:162:36: branch_true: ...to here
opus-1.6/silk/decode_core.c:164:29: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:180:39: branch_false: ...to here
opus-1.6/silk/decode_core.c:181:25: branch_true: following 'true' branch...
opus-1.6/silk/decode_core.c:185:32: branch_true: ...to here
opus-1.6/silk/decode_core.c:185:32: danger: use of uninitialized value '*pred_lag_ptr' here
#  183|                   /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */
#  184|                   LTP_pred_Q13 = 2;
#  185|->                 LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[  0 ], B_Q14[ 0 ] );
#  186|                   LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], B_Q14[ 1 ] );
#  187|                   LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], B_Q14[ 2 ] );

Error: GCC_ANALYZER_WARNING (CWE-457): [#def90]
opus-1.6/silk/decode_core.c:228:45: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
opus-1.6/silk/decode_core.c:103:17: branch_true: following 'true' branch...
opus-1.6/silk/decode_core.c:105:42: branch_true: ...to here
opus-1.6/silk/decode_core.c:116:11: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:129:9: branch_false: ...to here
opus-1.6/silk/decode_core.c:203:21: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:235:9: branch_false: ...to here
opus-1.6/silk/decode_core.c:103:17: branch_true: following 'true' branch...
opus-1.6/silk/decode_core.c:105:42: branch_true: ...to here
opus-1.6/silk/decode_core.c:116:11: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:129:9: branch_false: ...to here
opus-1.6/silk/decode_core.c:132:11: branch_true: following 'true' branch...
opus-1.6/silk/decode_core.c:132:13: branch_true: following 'true' branch (when 'k <= 1')...
opus-1.6/silk/decode_core.c:135:13: branch_true: ...to here
opus-1.6/silk/decode_core.c:147:15: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:169:19: branch_false: following 'false' branch (when 'gain_adj_Q16 == 65536')...
opus-1.6/silk/decode_core.c:180:39: branch_false: ...to here
opus-1.6/silk/decode_core.c:181:25: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:203:9: branch_false: ...to here
opus-1.6/silk/decode_core.c:203:21: branch_true: following 'true' branch...
opus-1.6/silk/decode_core.c:205:13: branch_true: ...to here
opus-1.6/silk/decode_core.c:205:13: branch_false: following 'false' branch...
opus-1.6/silk/decode_core.c:207:13: branch_false: ...to here
opus-1.6/silk/decode_core.c:228:45: danger: use of uninitialized value '*<unknown>' here
#  226|   
#  227|               /* Add prediction to LPC excitation */
#  228|->             sLPC_Q14[ MAX_LPC_ORDER + i ] = silk_ADD_SAT32( pres_Q14[ i ], silk_LSHIFT_SAT32( LPC_pred_Q10, 4 ) );
#  229|   
#  230|               /* Scale with gain */

Error: CPPCHECK_WARNING (CWE-457): [#def91]
opus-1.6/silk/decode_parameters.c:72: warning[uninitvar]: Uninitialized variable: pNLSF0_Q15
#   70|   
#   71|           /* Convert NLSF parameters to AR prediction filter coefficients */
#   72|->         silk_NLSF2A( psDecCtrl->PredCoef_Q12[ 0 ], pNLSF0_Q15, psDec->LPC_order, psDec->arch );
#   73|       } else {
#   74|           /* Copy LPC coefficients for first half from second half */

Error: GCC_ANALYZER_WARNING (CWE-126): [#def92]
opus-1.6/silk/float/encode_frame_FLP.c:433:37: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
opus-1.6/silk/float/encode_frame_FLP.c:408:7: branch_true: following 'true' branch...
opus-1.6/silk/float/encode_frame_FLP.c:432:21: branch_true: following 'true' branch...
opus-1.6/silk/float/encode_frame_FLP.c:433:37: branch_true: ...to here
opus-1.6/silk/float/encode_frame_FLP.c:432:21: branch_true: following 'true' branch...
opus-1.6/silk/float/encode_frame_FLP.c:433:37: branch_true: ...to here
opus-1.6/silk/float/encode_frame_FLP.c:432:21: branch_true: following 'true' branch...
opus-1.6/silk/float/encode_frame_FLP.c:433:37: branch_true: ...to here
opus-1.6/silk/float/encode_frame_FLP.c:432:21: branch_true: following 'true' branch...
opus-1.6/silk/float/encode_frame_FLP.c:433:37: branch_true: ...to here
opus-1.6/silk/float/encode_frame_FLP.c:432:21: branch_true: following 'true' branch...
opus-1.6/silk/float/encode_frame_FLP.c:433:37: branch_true: ...to here
opus-1.6/silk/float/encode_frame_FLP.c:433:37: danger: out-of-bounds read from byte 16 till byte 19 but 'Gains_Q16' ends at byte 16
#  431|           /* Overwrite unquantized gains with quantized gains and convert back to Q0 from Q16 */
#  432|           for( k = 0; k <  psEnc->sCmn.nb_subfr; k++ ) {
#  433|->             psEncCtrl->Gains[ k ] = Gains_Q16[ k ] * ( 1.0f / 65536.0f );
#  434|           }
#  435|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def93]
opus-1.6/silk/float/pitch_analysis_core_FLP.c:548:49: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'scratch_mem[<unknown>]'
opus-1.6/silk/float/pitch_analysis_core_FLP.c:509:5: branch_false: following 'false' branch (when 'complexity >= 0')...
opus-1.6/silk/float/pitch_analysis_core_FLP.c:510:5: branch_false: ...to here
opus-1.6/silk/float/pitch_analysis_core_FLP.c:510:5: branch_false: following 'false' branch (when 'complexity <= 2')...
opus-1.6/silk/float/pitch_analysis_core_FLP.c:512:7: branch_false: ...to here
opus-1.6/silk/float/pitch_analysis_core_FLP.c:512:7: branch_true: following 'true' branch (when 'nb_subfr == 4')...
opus-1.6/silk/float/pitch_analysis_core_FLP.c:513:9: branch_true: ...to here
opus-1.6/silk/float/pitch_analysis_core_FLP.c:526:17: branch_true: following 'true' branch (when 'k < nb_subfr')...
opus-1.6/silk/float/pitch_analysis_core_FLP.c:530:20: branch_true: ...to here
opus-1.6/silk/float/pitch_analysis_core_FLP.c:534:27: branch_false: following 'false' branch (when 'j > lag_high')...
opus-1.6/silk/float/pitch_analysis_core_FLP.c:540:17: branch_false: ...to here
opus-1.6/silk/float/pitch_analysis_core_FLP.c:541:21: branch_true: following 'true' branch (when 'i < nb_cbk_search')...
opus-1.6/silk/float/pitch_analysis_core_FLP.c:544:19: branch_true: ...to here
opus-1.6/silk/float/pitch_analysis_core_FLP.c:545:25: branch_true: following 'true' branch (when 'j != 5')...
opus-1.6/silk/float/pitch_analysis_core_FLP.c:548:62: branch_true: ...to here
opus-1.6/silk/float/pitch_analysis_core_FLP.c:548:49: danger: use of uninitialized value 'scratch_mem[<unknown>]' here
#  546|                   silk_assert( idx + j < SCRATCH_SIZE );
#  547|                   silk_assert( idx + j < lag_counter );
#  548|->                 cross_corr_st3[ k ][ i ][ j ] = scratch_mem[ idx + j ];
#  549|               }
#  550|           }

Error: CPPCHECK_WARNING (CWE-457): [#def94]
opus-1.6/silk/float/process_gains_FLP.c:71: warning[uninitvar]: Uninitialized variable: pGains_Q16
#   69|   
#   70|       /* Save unquantized gains and gain Index */
#   71|->     silk_memcpy( psEncCtrl->GainsUnq_Q16, pGains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) );
#   72|       psEncCtrl->lastGainIndexPrev = psShapeSt->LastGainIndex;
#   73|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def95]
opus-1.6/silk/float/process_gains_FLP.c:71:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&pGains_Q16'
opus-1.6/silk/float/process_gains_FLP.c:58:17: branch_false: following 'false' branch...
opus-1.6/silk/float/process_gains_FLP.c:58:17: branch_false: ...to here
opus-1.6/silk/float/process_gains_FLP.c:66:17: branch_false: following 'false' branch...
opus-1.6/silk/float/process_gains_FLP.c:71:5: branch_false: ...to here
opus-1.6/silk/float/process_gains_FLP.c:71:5: danger: use of uninitialized value '&pGains_Q16' here
#   69|   
#   70|       /* Save unquantized gains and gain Index */
#   71|->     silk_memcpy( psEncCtrl->GainsUnq_Q16, pGains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) );
#   72|       psEncCtrl->lastGainIndexPrev = psShapeSt->LastGainIndex;
#   73|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def96]
opus-1.6/silk/float/process_gains_FLP.c:80:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
opus-1.6/silk/float/process_gains_FLP.c:58:17: branch_true: following 'true' branch...
opus-1.6/silk/float/process_gains_FLP.c:60:9: branch_true: ...to here
opus-1.6/silk/float/process_gains_FLP.c:66:17: branch_false: following 'false' branch...
opus-1.6/silk/float/process_gains_FLP.c:71:5: branch_false: ...to here
opus-1.6/silk/float/process_gains_FLP.c:79:17: branch_true: following 'true' branch...
opus-1.6/silk/float/process_gains_FLP.c:80:33: branch_true: ...to here
opus-1.6/silk/float/process_gains_FLP.c:79:17: branch_true: following 'true' branch...
opus-1.6/silk/float/process_gains_FLP.c:80:33: branch_true: ...to here
opus-1.6/silk/float/process_gains_FLP.c:79:17: branch_true: following 'true' branch...
opus-1.6/silk/float/process_gains_FLP.c:80:33: branch_true: ...to here
opus-1.6/silk/float/process_gains_FLP.c:79:17: branch_true: following 'true' branch...
opus-1.6/silk/float/process_gains_FLP.c:80:33: branch_true: ...to here
opus-1.6/silk/float/process_gains_FLP.c:79:17: branch_true: following 'true' branch...
opus-1.6/silk/float/process_gains_FLP.c:80:33: branch_true: ...to here
opus-1.6/silk/float/process_gains_FLP.c:80:33: danger: out-of-bounds read from byte 16 till byte 19 but 'pGains_Q16' ends at byte 16
#   78|       /* Overwrite unquantized gains with quantized gains and convert back to Q0 from Q16 */
#   79|       for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
#   80|->         psEncCtrl->Gains[ k ] = pGains_Q16[ k ] / 65536.0f;
#   81|       }
#   82|   

Error: COMPILER_WARNING: [#def97]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:50:14: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI
#   48|       /* 4x unrolled loop */
#   49|       result = 0.0;
#   50|->     accum1 = accum2 = _mm256_setzero_pd();
#   51|       for( i = 0; i < dataSize - 7; i += 8 ) {
#   52|           __m128  x1f, x2f;

Error: COMPILER_WARNING: [#def98]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:50:23: note[note]: called from here
#   48|       /* 4x unrolled loop */
#   49|       result = 0.0;
#   50|->     accum1 = accum2 = _mm256_setzero_pd();
#   51|       for( i = 0; i < dataSize - 7; i += 8 ) {
#   52|           __m128  x1f, x2f;

Error: COMPILER_WARNING: [#def99]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:56:15: note[note]: called from here
#   54|           x1f = _mm_loadu_ps( &data1[ i ] );
#   55|           x2f = _mm_loadu_ps( &data2[ i ] );
#   56|->         x1d = _mm256_cvtps_pd( x1f );
#   57|           x2d = _mm256_cvtps_pd( x2f );
#   58|           accum1 = _mm256_fmadd_pd( x1d, x2d, accum1 );

Error: COMPILER_WARNING: [#def100]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:57:15: note[note]: called from here
#   55|           x2f = _mm_loadu_ps( &data2[ i ] );
#   56|           x1d = _mm256_cvtps_pd( x1f );
#   57|->         x2d = _mm256_cvtps_pd( x2f );
#   58|           accum1 = _mm256_fmadd_pd( x1d, x2d, accum1 );
#   59|           x1f = _mm_loadu_ps( &data1[ i + 4 ] );

Error: COMPILER_WARNING: [#def101]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:58:18: note[note]: called from here
#   56|           x1d = _mm256_cvtps_pd( x1f );
#   57|           x2d = _mm256_cvtps_pd( x2f );
#   58|->         accum1 = _mm256_fmadd_pd( x1d, x2d, accum1 );
#   59|           x1f = _mm_loadu_ps( &data1[ i + 4 ] );
#   60|           x2f = _mm_loadu_ps( &data2[ i + 4 ] );

Error: COMPILER_WARNING: [#def102]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:61:15: note[note]: called from here
#   59|           x1f = _mm_loadu_ps( &data1[ i + 4 ] );
#   60|           x2f = _mm_loadu_ps( &data2[ i + 4 ] );
#   61|->         x1d = _mm256_cvtps_pd( x1f );
#   62|           x2d = _mm256_cvtps_pd( x2f );
#   63|           accum2 = _mm256_fmadd_pd( x1d, x2d, accum2 );

Error: COMPILER_WARNING: [#def103]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:62:15: note[note]: called from here
#   60|           x2f = _mm_loadu_ps( &data2[ i + 4 ] );
#   61|           x1d = _mm256_cvtps_pd( x1f );
#   62|->         x2d = _mm256_cvtps_pd( x2f );
#   63|           accum2 = _mm256_fmadd_pd( x1d, x2d, accum2 );
#   64|       }

Error: COMPILER_WARNING: [#def104]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:63:18: note[note]: called from here
#   61|           x1d = _mm256_cvtps_pd( x1f );
#   62|           x2d = _mm256_cvtps_pd( x2f );
#   63|->         accum2 = _mm256_fmadd_pd( x1d, x2d, accum2 );
#   64|       }
#   65|       for( ; i < dataSize - 3; i += 4 ) {

Error: COMPILER_WARNING: [#def105]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:70:15: note[note]: called from here
#   68|           x1f = _mm_loadu_ps( &data1[ i ] );
#   69|           x2f = _mm_loadu_ps( &data2[ i ] );
#   70|->         x1d = _mm256_cvtps_pd( x1f );
#   71|           x2d = _mm256_cvtps_pd( x2f );
#   72|           accum1 = _mm256_fmadd_pd( x1d, x2d, accum1 );

Error: COMPILER_WARNING: [#def106]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:71:15: note[note]: called from here
#   69|           x2f = _mm_loadu_ps( &data2[ i ] );
#   70|           x1d = _mm256_cvtps_pd( x1f );
#   71|->         x2d = _mm256_cvtps_pd( x2f );
#   72|           accum1 = _mm256_fmadd_pd( x1d, x2d, accum1 );
#   73|       }

Error: COMPILER_WARNING: [#def107]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:72:18: note[note]: called from here
#   70|           x1d = _mm256_cvtps_pd( x1f );
#   71|           x2d = _mm256_cvtps_pd( x2f );
#   72|->         accum1 = _mm256_fmadd_pd( x1d, x2d, accum1 );
#   73|       }
#   74|       accum1 = _mm256_add_pd(accum1, accum2);

Error: COMPILER_WARNING: [#def108]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:74:14: note[note]: called from here
#   72|           accum1 = _mm256_fmadd_pd( x1d, x2d, accum1 );
#   73|       }
#   74|->     accum1 = _mm256_add_pd(accum1, accum2);
#   75|       accum1 = _mm256_add_pd(accum1, _mm256_permute2f128_pd(accum1, accum1, 1));
#   76|       accum1 = _mm256_hadd_pd(accum1,accum1);

Error: COMPILER_WARNING: [#def109]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:75:14: note[note]: called from here
#   73|       }
#   74|       accum1 = _mm256_add_pd(accum1, accum2);
#   75|->     accum1 = _mm256_add_pd(accum1, _mm256_permute2f128_pd(accum1, accum1, 1));
#   76|       accum1 = _mm256_hadd_pd(accum1,accum1);
#   77|       result = _mm256_cvtsd_f64(accum1);

Error: COMPILER_WARNING: [#def110]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:76:14: note[note]: called from here
#   74|       accum1 = _mm256_add_pd(accum1, accum2);
#   75|       accum1 = _mm256_add_pd(accum1, _mm256_permute2f128_pd(accum1, accum1, 1));
#   76|->     accum1 = _mm256_hadd_pd(accum1,accum1);
#   77|       result = _mm256_cvtsd_f64(accum1);
#   78|   

Error: COMPILER_WARNING: [#def111]
opus-1.6/silk/float/x86/inner_product_FLP_avx2.c:77:14: note[note]: called from here
#   75|       accum1 = _mm256_add_pd(accum1, _mm256_permute2f128_pd(accum1, accum1, 1));
#   76|       accum1 = _mm256_hadd_pd(accum1,accum1);
#   77|->     result = _mm256_cvtsd_f64(accum1);
#   78|   
#   79|       /* add any remaining products */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def112]
opus-1.6/silk/quant_LTP_gains.c:112:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&temp_idx'
opus-1.6/silk/quant_LTP_gains.c:64:17: branch_true: following 'true' branch (when 'k != 3')...
opus-1.6/silk/quant_LTP_gains.c:69:9: branch_true: ...to here
opus-1.6/silk/quant_LTP_gains.c:81:21: branch_false: following 'false' branch (when 'j >= nb_subfr')...
opus-1.6/silk/quant_LTP_gains.c:109:11: branch_false: ...to here
opus-1.6/silk/quant_LTP_gains.c:109:11: branch_true: following 'true' branch (when 'rate_dist_Q7 <= min_rate_dist_Q7')...
opus-1.6/silk/quant_LTP_gains.c:111:34: branch_true: ...to here
opus-1.6/silk/quant_LTP_gains.c:112:13: danger: use of uninitialized value '&temp_idx' here
#  110|               min_rate_dist_Q7 = rate_dist_Q7;
#  111|               *periodicity_index = (opus_int8)k;
#  112|->             silk_memcpy( cbk_index, temp_idx, nb_subfr * sizeof( opus_int8 ) );
#  113|               best_sum_log_gain_Q7 = sum_log_gain_tmp_Q7;
#  114|           }

Error: CPPCHECK_WARNING (CWE-786): [#def113]
opus-1.6/silk/stereo_LR_to_MS.c:58: error[negativeIndex]: Array 'x1[0]' accessed at index -2, which is out of bounds.
#   56|       VARDECL( opus_int16, LP_side );
#   57|       VARDECL( opus_int16, HP_side );
#   58|->     opus_int16 *mid = &x1[ -2 ];
#   59|       SAVE_STACK;
#   60|   

Error: CPPCHECK_WARNING (CWE-786): [#def114]
opus-1.6/silk/stereo_LR_to_MS.c:64: error[negativeIndex]: Array 'x1[0]' accessed at index -2, which is out of bounds.
#   62|       /* Convert to basic mid/side signals */
#   63|       for( n = 0; n < frame_length + 2; n++ ) {
#   64|->         sum  = x1[ n - 2 ] + (opus_int32)x2[ n - 2 ];
#   65|           diff = x1[ n - 2 ] - (opus_int32)x2[ n - 2 ];
#   66|           mid[  n ] = (opus_int16)silk_RSHIFT_ROUND( sum, 1 );

Error: CPPCHECK_WARNING (CWE-786): [#def115]
opus-1.6/silk/stereo_LR_to_MS.c:64: error[negativeIndex]: Array 'x2[0]' accessed at index -2, which is out of bounds.
#   62|       /* Convert to basic mid/side signals */
#   63|       for( n = 0; n < frame_length + 2; n++ ) {
#   64|->         sum  = x1[ n - 2 ] + (opus_int32)x2[ n - 2 ];
#   65|           diff = x1[ n - 2 ] - (opus_int32)x2[ n - 2 ];
#   66|           mid[  n ] = (opus_int16)silk_RSHIFT_ROUND( sum, 1 );

Error: CPPCHECK_WARNING (CWE-786): [#def116]
opus-1.6/silk/stereo_LR_to_MS.c:65: error[negativeIndex]: Array 'x1[0]' accessed at index -2, which is out of bounds.
#   63|       for( n = 0; n < frame_length + 2; n++ ) {
#   64|           sum  = x1[ n - 2 ] + (opus_int32)x2[ n - 2 ];
#   65|->         diff = x1[ n - 2 ] - (opus_int32)x2[ n - 2 ];
#   66|           mid[  n ] = (opus_int16)silk_RSHIFT_ROUND( sum, 1 );
#   67|           side[ n ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( diff, 1 ) );

Error: CPPCHECK_WARNING (CWE-786): [#def117]
opus-1.6/silk/stereo_LR_to_MS.c:65: error[negativeIndex]: Array 'x2[0]' accessed at index -2, which is out of bounds.
#   63|       for( n = 0; n < frame_length + 2; n++ ) {
#   64|           sum  = x1[ n - 2 ] + (opus_int32)x2[ n - 2 ];
#   65|->         diff = x1[ n - 2 ] - (opus_int32)x2[ n - 2 ];
#   66|           mid[  n ] = (opus_int16)silk_RSHIFT_ROUND( sum, 1 );
#   67|           side[ n ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( diff, 1 ) );

Error: COMPILER_WARNING: [#def118]
opus-1.6/silk/x86/NSQ_del_dec_avx2.c:157:1: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI
#  155|   }
#  156|   static OPUS_INLINE __m256i silk_mm256_sub_sat_epi32(__m256i a, __m256i b)
#  157|-> {
#  158|       __m256i r = _mm256_sub_epi32(a, b);
#  159|       __m256i OF = _mm256_andnot_si256(_mm256_xor_si256(b, r), _mm256_xor_si256(a, r));        /* OF = (sum ^ a) & (sum ^ ~b) = (sum ^ a) & ~(sum ^ b) */

Error: COMPILER_WARNING: [#def119]
opus-1.6/silk/x86/NSQ_del_dec_avx2.c:210:28: note[note]: the ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
#  208|   }
#  209|   
#  210|-> static OPUS_INLINE __m256i silk_mm256_reverse_epi32(__m256i v)
#  211|   {
#  212|       v = _mm256_shuffle_epi32(v, 0x1B);

Error: COMPILER_WARNING: [#def120]
opus-1.6/silk/x86/NSQ_del_dec_avx2.c:253:12: note[note]: called from here
#  251|   static OPUS_INLINE __m128i silk_mm256_rand_epi32(__m128i seed)
#  252|   {
#  253|->     seed = _mm_mullo_epi32(seed, _mm_set1_epi32(RAND_MULTIPLIER));
#  254|       seed = _mm_add_epi32(seed, _mm_set1_epi32(RAND_INCREMENT));
#  255|       return seed;

Error: COMPILER_WARNING: [#def121]
opus-1.6/silk/x86/NSQ_del_dec_sse4_1.c:820:24: note[note]: called from here
#  818|   
#  819|       for( i = 0; i < psEncC->subfr_length - 3; i += 4 ) {
#  820|->         xmm_x16_x2x0 = OP_CVTEPI16_EPI32_M64( &(x16[ i ] ) );
#  821|   
#  822|           /* equal shift right 4 bytes*/

Error: COMPILER_WARNING: [#def122]
opus-1.6/silk/x86/NSQ_del_dec_sse4_1.c:825:24: note[note]: called from here
#  823|           xmm_x16_x3x1 = _mm_shuffle_epi32( xmm_x16_x2x0, _MM_SHUFFLE( 0, 3, 2, 1 ) );
#  824|   
#  825|->         xmm_x16_x2x0 = _mm_mul_epi32( xmm_x16_x2x0, xmm_inv_gain_Q26 );
#  826|           xmm_x16_x3x1 = _mm_mul_epi32( xmm_x16_x3x1, xmm_inv_gain_Q26 );
#  827|   

Error: COMPILER_WARNING: [#def123]
opus-1.6/silk/x86/NSQ_del_dec_sse4_1.c:826:24: note[note]: called from here
#  824|   
#  825|           xmm_x16_x2x0 = _mm_mul_epi32( xmm_x16_x2x0, xmm_inv_gain_Q26 );
#  826|->         xmm_x16_x3x1 = _mm_mul_epi32( xmm_x16_x3x1, xmm_inv_gain_Q26 );
#  827|   
#  828|           xmm_x16_x2x0 = _mm_srli_epi64( xmm_x16_x2x0, 16 );

Error: COMPILER_WARNING: [#def124]
opus-1.6/silk/x86/NSQ_del_dec_sse4_1.c:831:24: note[note]: called from here
#  829|           xmm_x16_x3x1 = _mm_slli_epi64( xmm_x16_x3x1, 16 );
#  830|   
#  831|->         xmm_x16_x2x0 = _mm_blend_epi16( xmm_x16_x2x0, xmm_x16_x3x1, 0xCC );
#  832|   
#  833|           _mm_storeu_si128( (__m128i *)(void*)(&(x_sc_Q10[ i ] ) ), xmm_x16_x2x0 );

Error: COMPILER_WARNING: [#def125]
opus-1.6/silk/x86/NSQ_del_dec_sse4_1.c:869:41: note[note]: called from here
#  867|                   xmm_sLTP_shp_Q14_x3x1 = _mm_shuffle_epi32( xmm_sLTP_shp_Q14_x2x0, _MM_SHUFFLE( 0, 3, 2, 1 ) );
#  868|   
#  869|->                 xmm_sLTP_shp_Q14_x2x0 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x2x0, xmm_gain_adj_Q16 );
#  870|                   xmm_sLTP_shp_Q14_x3x1 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x3x1, xmm_gain_adj_Q16 );
#  871|   

Error: COMPILER_WARNING: [#def126]
opus-1.6/silk/x86/NSQ_del_dec_sse4_1.c:870:41: note[note]: called from here
#  868|   
#  869|                   xmm_sLTP_shp_Q14_x2x0 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x2x0, xmm_gain_adj_Q16 );
#  870|->                 xmm_sLTP_shp_Q14_x3x1 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x3x1, xmm_gain_adj_Q16 );
#  871|   
#  872|                   xmm_sLTP_shp_Q14_x2x0 = _mm_srli_epi64( xmm_sLTP_shp_Q14_x2x0, 16 );

Error: COMPILER_WARNING: [#def127]
opus-1.6/silk/x86/NSQ_del_dec_sse4_1.c:875:41: note[note]: called from here
#  873|                   xmm_sLTP_shp_Q14_x3x1 = _mm_slli_epi64( xmm_sLTP_shp_Q14_x3x1, 16 );
#  874|   
#  875|->                 xmm_sLTP_shp_Q14_x2x0 = _mm_blend_epi16( xmm_sLTP_shp_Q14_x2x0, xmm_sLTP_shp_Q14_x3x1, 0xCC );
#  876|   
#  877|                   _mm_storeu_si128( (__m128i *)(void*)(&(NSQ->sLTP_shp_Q14[ i ] ) ), xmm_sLTP_shp_Q14_x2x0 );

Error: CPPCHECK_WARNING (CWE-786): [#def128]
opus-1.6/silk/x86/NSQ_sse4_1.c:555: error[negativeIndex]: Array 'table[0][4]' accessed at index table[-1][*], which is out of bounds.
#  553|           }
#  554|   
#  555|->         q1_Q10 = table[q1_Q0][0];
#  556|           q2_Q10 = table[q1_Q0][1];
#  557|   

Error: CPPCHECK_WARNING (CWE-786): [#def129]
opus-1.6/silk/x86/NSQ_sse4_1.c:556: error[negativeIndex]: Array 'table[0][4]' accessed at index table[-1][*], which is out of bounds.
#  554|   
#  555|           q1_Q10 = table[q1_Q0][0];
#  556|->         q2_Q10 = table[q1_Q0][1];
#  557|   
#  558|           if (r_Q10 * table[q1_Q0][2] - table[q1_Q0][3] < 0)

Error: CPPCHECK_WARNING (CWE-786): [#def130]
opus-1.6/silk/x86/NSQ_sse4_1.c:558: error[negativeIndex]: Array 'table[0][4]' accessed at index table[-1][*], which is out of bounds.
#  556|           q2_Q10 = table[q1_Q0][1];
#  557|   
#  558|->         if (r_Q10 * table[q1_Q0][2] - table[q1_Q0][3] < 0)
#  559|           {
#  560|               q1_Q10 = q2_Q10;

Error: COMPILER_WARNING: [#def131]
opus-1.6/silk/x86/NSQ_sse4_1.c:688:24: note[note]: called from here
#  686|   
#  687|       for( i = 0; i < psEncC->subfr_length - 3; i += 4 ) {
#  688|->         xmm_x16_x2x0 = OP_CVTEPI16_EPI32_M64( &(x16[ i ] ) );
#  689|   
#  690|           /* equal shift right 4 bytes*/

Error: COMPILER_WARNING: [#def132]
opus-1.6/silk/x86/NSQ_sse4_1.c:693:24: note[note]: called from here
#  691|           xmm_x16_x3x1 = _mm_shuffle_epi32( xmm_x16_x2x0, _MM_SHUFFLE( 0, 3, 2, 1 ) );
#  692|   
#  693|->         xmm_x16_x2x0 = _mm_mul_epi32( xmm_x16_x2x0, xmm_inv_gain_Q26 );
#  694|           xmm_x16_x3x1 = _mm_mul_epi32( xmm_x16_x3x1, xmm_inv_gain_Q26 );
#  695|   

Error: COMPILER_WARNING: [#def133]
opus-1.6/silk/x86/NSQ_sse4_1.c:694:24: note[note]: called from here
#  692|   
#  693|           xmm_x16_x2x0 = _mm_mul_epi32( xmm_x16_x2x0, xmm_inv_gain_Q26 );
#  694|->         xmm_x16_x3x1 = _mm_mul_epi32( xmm_x16_x3x1, xmm_inv_gain_Q26 );
#  695|   
#  696|           xmm_x16_x2x0 = _mm_srli_epi64( xmm_x16_x2x0, 16 );

Error: COMPILER_WARNING: [#def134]
opus-1.6/silk/x86/NSQ_sse4_1.c:699:24: note[note]: called from here
#  697|           xmm_x16_x3x1 = _mm_slli_epi64( xmm_x16_x3x1, 16 );
#  698|   
#  699|->         xmm_x16_x2x0 = _mm_blend_epi16( xmm_x16_x2x0, xmm_x16_x3x1, 0xCC );
#  700|   
#  701|           _mm_storeu_si128( (__m128i *)(void*)(&(x_sc_Q10[ i ] ) ), xmm_x16_x2x0 );

Error: COMPILER_WARNING: [#def135]
opus-1.6/silk/x86/NSQ_sse4_1.c:736:37: note[note]: called from here
#  734|               xmm_sLTP_shp_Q14_x3x1 = _mm_shuffle_epi32( xmm_sLTP_shp_Q14_x2x0, _MM_SHUFFLE( 0, 3, 2, 1 ) );
#  735|   
#  736|->             xmm_sLTP_shp_Q14_x2x0 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x2x0, xmm_gain_adj_Q16 );
#  737|               xmm_sLTP_shp_Q14_x3x1 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x3x1, xmm_gain_adj_Q16 );
#  738|   

Error: COMPILER_WARNING: [#def136]
opus-1.6/silk/x86/NSQ_sse4_1.c:737:37: note[note]: called from here
#  735|   
#  736|               xmm_sLTP_shp_Q14_x2x0 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x2x0, xmm_gain_adj_Q16 );
#  737|->             xmm_sLTP_shp_Q14_x3x1 = _mm_mul_epi32( xmm_sLTP_shp_Q14_x3x1, xmm_gain_adj_Q16 );
#  738|   
#  739|               xmm_sLTP_shp_Q14_x2x0 = _mm_srli_epi64( xmm_sLTP_shp_Q14_x2x0, 16 );

Error: COMPILER_WARNING: [#def137]
opus-1.6/silk/x86/NSQ_sse4_1.c:742:37: note[note]: called from here
#  740|               xmm_sLTP_shp_Q14_x3x1 = _mm_slli_epi64( xmm_sLTP_shp_Q14_x3x1, 16 );
#  741|   
#  742|->             xmm_sLTP_shp_Q14_x2x0 = _mm_blend_epi16( xmm_sLTP_shp_Q14_x2x0, xmm_sLTP_shp_Q14_x3x1, 0xCC );
#  743|   
#  744|               _mm_storeu_si128( (__m128i *)(void*)(&(NSQ->sLTP_shp_Q14[ i ] ) ), xmm_sLTP_shp_Q14_x2x0 );

Error: COMPILER_WARNING: [#def138]
opus-1.6/silk/x86/VQ_WMat_EC_sse4_1.c:88:26: note[note]: called from here
#   86|   
#   87|           /* first row of XX_Q17 */
#   88|->         v_cb_row_31_Q7 = OP_CVTEPI8_EPI32_M32( &cb_row_Q7[ 1 ] );
#   89|           v_cb_row_42_Q7 = _mm_shuffle_epi32( v_cb_row_31_Q7, _MM_SHUFFLE( 0, 3, 2, 1 ) );
#   90|           v_cb_row_31_Q7 = _mm_mul_epi32( v_XX_31_Q17, v_cb_row_31_Q7 );

Error: COMPILER_WARNING: [#def139]
opus-1.6/silk/x86/VQ_WMat_EC_sse4_1.c:90:26: note[note]: called from here
#   88|           v_cb_row_31_Q7 = OP_CVTEPI8_EPI32_M32( &cb_row_Q7[ 1 ] );
#   89|           v_cb_row_42_Q7 = _mm_shuffle_epi32( v_cb_row_31_Q7, _MM_SHUFFLE( 0, 3, 2, 1 ) );
#   90|->         v_cb_row_31_Q7 = _mm_mul_epi32( v_XX_31_Q17, v_cb_row_31_Q7 );
#   91|           v_cb_row_42_Q7 = _mm_mul_epi32( v_XX_42_Q17, v_cb_row_42_Q7 );
#   92|           v_acc1_Q24 = _mm_add_epi64( v_cb_row_31_Q7, v_cb_row_42_Q7);

Error: COMPILER_WARNING: [#def140]
opus-1.6/silk/x86/VQ_WMat_EC_sse4_1.c:91:26: note[note]: called from here
#   89|           v_cb_row_42_Q7 = _mm_shuffle_epi32( v_cb_row_31_Q7, _MM_SHUFFLE( 0, 3, 2, 1 ) );
#   90|           v_cb_row_31_Q7 = _mm_mul_epi32( v_XX_31_Q17, v_cb_row_31_Q7 );
#   91|->         v_cb_row_42_Q7 = _mm_mul_epi32( v_XX_42_Q17, v_cb_row_42_Q7 );
#   92|           v_acc1_Q24 = _mm_add_epi64( v_cb_row_31_Q7, v_cb_row_42_Q7);
#   93|           v_acc2_Q24 = _mm_shuffle_epi32( v_acc1_Q24, _MM_SHUFFLE( 1, 0, 3, 2 ) );

Error: CPPCHECK_WARNING (CWE-457): [#def141]
opus-1.6/src/analysis.c:207: warning[uninitvar]: Uninitialized variable: tmp3x
#  205|            tmp3x[3*j+2] = tmp[j];
#  206|         }
#  207|->       silk_resampler_down2_hp(S, y, tmp3x, 3*subframe);
#  208|      }
#  209|      RESTORE_STACK;

Error: CPPCHECK_WARNING (CWE-457): [#def142]
opus-1.6/src/mlp.c:126: warning[uninitvar]: Uninitialized variable: tmp
#  124|         tmp[i] = state[i] * r[i];
#  125|      gemm_accum(h, &gru->input_weights[2*N], N, M, stride, input);
#  126|->    gemm_accum(h, &gru->recurrent_weights[2*N], N, N, stride, tmp);
#  127|      for (i=0;i<N;i++)
#  128|         h[i] = z[i]*state[i] + (1-z[i])*tansig_approx(WEIGHTS_SCALE*h[i]);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def143]
opus-1.6/src/opus_compare.c:51:10: warning[-Wanalyzer-double-free]: double-‘free’ of ‘_ptr’
opus-1.6/src/opus_compare.c:165:5: enter_function: entry to ‘main’
opus-1.6/src/opus_compare.c:188:5: branch_false: following ‘false’ branch...
opus-1.6/src/opus_compare.c:194:6: branch_false: ...to here
opus-1.6/src/opus_compare.c:202:5: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_compare.c:219:8: branch_false: ...to here
opus-1.6/src/opus_compare.c:220:5: branch_false: following ‘false’ branch...
opus-1.6/src/opus_compare.c:224:8: branch_false: ...to here
opus-1.6/src/opus_compare.c:225:5: branch_false: following ‘false’ branch...
opus-1.6/src/opus_compare.c:231:11: branch_false: ...to here
opus-1.6/src/opus_compare.c:231:11: call_function: calling ‘read_pcm16’ from ‘main’
opus-1.6/src/opus_compare.c:231:11: return_function: returning to ‘main’ from ‘read_pcm16’
opus-1.6/src/opus_compare.c:232:5: branch_true: following ‘true’ branch (when ‘nchannels == 1’)...
opus-1.6/src/opus_compare.c:232:5: branch_true: ...to here
opus-1.6/src/opus_compare.c:233:14: branch_false: following ‘false’ branch...
opus-1.6/src/opus_compare.c:235:3: branch_false: ...to here
opus-1.6/src/opus_compare.c:236:11: call_function: calling ‘read_pcm16’ from ‘main’
#   49|   
#   50|   static void *opus_realloc(void *_ptr,size_t _size){
#   51|->   return check_alloc(realloc(_ptr,_size));
#   52|   }
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def144]
opus-1.6/src/opus_compare.c:233:40: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
opus-1.6/src/opus_compare.c:165:5: enter_function: entry to ‘main’
opus-1.6/src/opus_compare.c:188:5: branch_false: following ‘false’ branch...
opus-1.6/src/opus_compare.c:194:6: branch_false: ...to here
opus-1.6/src/opus_compare.c:202:5: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_compare.c:219:8: branch_false: ...to here
opus-1.6/src/opus_compare.c:220:5: branch_false: following ‘false’ branch...
opus-1.6/src/opus_compare.c:224:8: branch_false: ...to here
opus-1.6/src/opus_compare.c:225:5: branch_false: following ‘false’ branch...
opus-1.6/src/opus_compare.c:231:11: branch_false: ...to here
opus-1.6/src/opus_compare.c:231:11: call_function: calling ‘read_pcm16’ from ‘main’
opus-1.6/src/opus_compare.c:231:11: return_function: returning to ‘main’ from ‘read_pcm16’
opus-1.6/src/opus_compare.c:232:5: branch_true: following ‘true’ branch (when ‘nchannels == 1’)...
opus-1.6/src/opus_compare.c:232:5: branch_true: ...to here
opus-1.6/src/opus_compare.c:233:14: branch_true: following ‘true’ branch...
opus-1.6/src/opus_compare.c:233:40: danger: use of uninitialized value ‘*<unknown>’ here
#  231|     xlength=read_pcm16(&x,fin1,2);
#  232|     if(nchannels==1){
#  233|->     for(xi=0;xi<xlength;xi++)x[xi]=.5*(x[2*xi]+x[2*xi+1]);
#  234|     }
#  235|     fclose(fin1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def145]
opus-1.6/src/opus_demo.c:1009:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fbytes’
opus-1.6/src/opus_demo.c:483:8: branch_false: following ‘false’ branch (when ‘argc > 4’)...
opus-1.6/src/opus_demo.c:490:5: branch_false: ...to here
opus-1.6/src/opus_demo.c:502:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:508:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:549:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:555:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:555:8: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:557:43: branch_true: ...to here
opus-1.6/src/opus_demo.c:571:12: branch_true: following ‘true’ branch...
opus-1.6/src/opus_demo.c:573:25: branch_true: ...to here
opus-1.6/src/opus_demo.c:577:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_demo.c:596:20: branch_false: ...to here
opus-1.6/src/opus_demo.c:596:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_demo.c:623:20: branch_false: ...to here
opus-1.6/src/opus_demo.c:623:18: branch_true: following ‘true’ branch (when the strings are equal)...
opus-1.6/src/opus_demo.c:624:13: branch_true: ...to here
opus-1.6/src/opus_demo.c:624:13: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:625:45: branch_false: ...to here
opus-1.6/src/opus_demo.c:770:8: branch_false: following ‘false’ branch (when ‘sweep_max == 0’)...
opus-1.6/src/opus_demo.c:773:9: branch_false: ...to here
opus-1.6/src/opus_demo.c:773:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:780:18: branch_false: ...to here
opus-1.6/src/opus_demo.c:782:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:787:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:787:8: branch_false: following ‘false’ branch (when ‘mode_list’ is NULL)...
opus-1.6/src/opus_demo.c:787:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:803:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:809:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:809:8: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:811:14: branch_true: ...to here
opus-1.6/src/opus_demo.c:812:11: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:817:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:828:8: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/src/opus_demo.c:828:8: branch_true: ...to here
opus-1.6/src/opus_demo.c:830:11: branch_false: following ‘false’ branch (when ‘dred_duration <= 0’)...
opus-1.6/src/opus_demo.c:842:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:842:8: branch_false: following ‘false’ branch (when ‘encode_only != 0’)...
opus-1.6/src/opus_demo.c:859:5: branch_false: ...to here
opus-1.6/src/opus_demo.c:884:8: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:888:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:896:30: acquire_memory: this call could return NULL
opus-1.6/src/opus_demo.c:898:7: branch_false: following ‘false’ branch (when ‘delayed_decision == 0’)...
opus-1.6/src/opus_demo.c:921:16: branch_false: ...to here
opus-1.6/src/opus_demo.c:928:12: branch_true: following ‘true’ branch (when ‘stop == 0’)...
opus-1.6/src/opus_demo.c:930:12: branch_true: ...to here
opus-1.6/src/opus_demo.c:930:12: branch_false: following ‘false’ branch (when ‘delayed_celt == 0’)...
opus-1.6/src/opus_demo.c:934:19: branch_false: ...to here
opus-1.6/src/opus_demo.c:934:19: branch_false: following ‘false’ branch (when ‘random_framesize == 0’)...
opus-1.6/src/opus_demo.c:956:12: branch_false: ...to here
opus-1.6/src/opus_demo.c:956:12: branch_false: following ‘false’ branch (when ‘random_fec == 0’)...
opus-1.6/src/opus_demo.c:960:12: branch_false: ...to here
opus-1.6/src/opus_demo.c:960:12: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:986:16: branch_false: ...to here
opus-1.6/src/opus_demo.c:986:16: branch_false: following ‘false’ branch (when ‘mode_list’ is NULL)...
opus-1.6/src/opus_demo.c:1002:68: branch_false: ...to here
opus-1.6/src/opus_demo.c:1005:16: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/src/opus_demo.c:1005:16: branch_true: ...to here
opus-1.6/src/opus_demo.c:1006:24: branch_true: following ‘true’ branch...
opus-1.6/src/opus_demo.c:1009:28: branch_true: ...to here
opus-1.6/src/opus_demo.c:1009:38: danger: ‘fbytes + (sizetype)(i * 2)’ could be NULL: unchecked value from [(43)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/42)
# 1007|                  {
# 1008|                     opus_int32 s;
# 1009|->                   s=fbytes[2*i+1]<<8|fbytes[2*i];
# 1010|                     s=((s&0xFFFF)^0x8000)-0x8000;
# 1011|                     in[i]=s*256;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def146]
opus-1.6/src/opus_demo.c:1011:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’
opus-1.6/src/opus_demo.c:483:8: branch_false: following ‘false’ branch (when ‘argc > 4’)...
opus-1.6/src/opus_demo.c:490:5: branch_false: ...to here
opus-1.6/src/opus_demo.c:502:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:508:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:549:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:555:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:555:8: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:557:43: branch_true: ...to here
opus-1.6/src/opus_demo.c:571:12: branch_true: following ‘true’ branch...
opus-1.6/src/opus_demo.c:573:25: branch_true: ...to here
opus-1.6/src/opus_demo.c:577:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_demo.c:596:20: branch_false: ...to here
opus-1.6/src/opus_demo.c:596:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_demo.c:623:20: branch_false: ...to here
opus-1.6/src/opus_demo.c:623:18: branch_true: following ‘true’ branch (when the strings are equal)...
opus-1.6/src/opus_demo.c:624:13: branch_true: ...to here
opus-1.6/src/opus_demo.c:624:13: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:625:45: branch_false: ...to here
opus-1.6/src/opus_demo.c:770:8: branch_false: following ‘false’ branch (when ‘sweep_max == 0’)...
opus-1.6/src/opus_demo.c:773:9: branch_false: ...to here
opus-1.6/src/opus_demo.c:773:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:780:18: branch_false: ...to here
opus-1.6/src/opus_demo.c:782:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:787:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:787:8: branch_false: following ‘false’ branch (when ‘mode_list’ is NULL)...
opus-1.6/src/opus_demo.c:787:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:803:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:809:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:809:8: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:811:14: branch_true: ...to here
opus-1.6/src/opus_demo.c:812:11: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:817:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:828:8: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/src/opus_demo.c:828:8: branch_true: ...to here
opus-1.6/src/opus_demo.c:830:11: branch_false: following ‘false’ branch (when ‘dred_duration <= 0’)...
opus-1.6/src/opus_demo.c:842:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:842:8: branch_false: following ‘false’ branch (when ‘encode_only != 0’)...
opus-1.6/src/opus_demo.c:859:5: branch_false: ...to here
opus-1.6/src/opus_demo.c:884:8: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:888:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:893:23: acquire_memory: this call could return NULL
opus-1.6/src/opus_demo.c:898:7: branch_false: following ‘false’ branch (when ‘delayed_decision == 0’)...
opus-1.6/src/opus_demo.c:921:16: branch_false: ...to here
opus-1.6/src/opus_demo.c:928:12: branch_true: following ‘true’ branch (when ‘stop == 0’)...
opus-1.6/src/opus_demo.c:930:12: branch_true: ...to here
opus-1.6/src/opus_demo.c:930:12: branch_false: following ‘false’ branch (when ‘delayed_celt == 0’)...
opus-1.6/src/opus_demo.c:934:19: branch_false: ...to here
opus-1.6/src/opus_demo.c:934:19: branch_false: following ‘false’ branch (when ‘random_framesize == 0’)...
opus-1.6/src/opus_demo.c:956:12: branch_false: ...to here
opus-1.6/src/opus_demo.c:956:12: branch_false: following ‘false’ branch (when ‘random_fec == 0’)...
opus-1.6/src/opus_demo.c:960:12: branch_false: ...to here
opus-1.6/src/opus_demo.c:960:12: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:986:16: branch_false: ...to here
opus-1.6/src/opus_demo.c:986:16: branch_false: following ‘false’ branch (when ‘mode_list’ is NULL)...
opus-1.6/src/opus_demo.c:1002:68: branch_false: ...to here
opus-1.6/src/opus_demo.c:1005:16: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/src/opus_demo.c:1005:16: branch_true: ...to here
opus-1.6/src/opus_demo.c:1006:24: branch_true: following ‘true’ branch...
opus-1.6/src/opus_demo.c:1009:28: branch_true: ...to here
opus-1.6/src/opus_demo.c:1011:19: danger: ‘in + (long unsigned int)i * 4’ could be NULL: unchecked value from [(43)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/42)
# 1009|                     s=fbytes[2*i+1]<<8|fbytes[2*i];
# 1010|                     s=((s&0xFFFF)^0x8000)-0x8000;
# 1011|->                   in[i]=s*256;
# 1012|                  }
# 1013|               } else if (format == FORMAT_S24_LE) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def147]
opus-1.6/src/opus_demo.c:1045:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
opus-1.6/src/opus_demo.c:483:8: branch_false: following ‘false’ branch (when ‘argc > 4’)...
opus-1.6/src/opus_demo.c:490:5: branch_false: ...to here
opus-1.6/src/opus_demo.c:502:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:508:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:549:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:555:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:555:8: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:557:43: branch_true: ...to here
opus-1.6/src/opus_demo.c:571:12: branch_true: following ‘true’ branch...
opus-1.6/src/opus_demo.c:573:25: branch_true: ...to here
opus-1.6/src/opus_demo.c:577:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_demo.c:596:20: branch_false: ...to here
opus-1.6/src/opus_demo.c:596:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/opus_demo.c:623:20: branch_false: ...to here
opus-1.6/src/opus_demo.c:623:18: branch_true: following ‘true’ branch (when the strings are equal)...
opus-1.6/src/opus_demo.c:624:13: branch_true: ...to here
opus-1.6/src/opus_demo.c:624:13: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:625:45: branch_false: ...to here
opus-1.6/src/opus_demo.c:770:8: branch_false: following ‘false’ branch (when ‘sweep_max == 0’)...
opus-1.6/src/opus_demo.c:773:9: branch_false: ...to here
opus-1.6/src/opus_demo.c:773:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:780:18: branch_false: ...to here
opus-1.6/src/opus_demo.c:782:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:787:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:787:8: branch_false: following ‘false’ branch (when ‘mode_list’ is NULL)...
opus-1.6/src/opus_demo.c:787:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:803:8: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:809:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:809:8: branch_true: following ‘true’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:811:14: branch_true: ...to here
opus-1.6/src/opus_demo.c:812:11: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:817:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:828:8: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/src/opus_demo.c:828:8: branch_true: ...to here
opus-1.6/src/opus_demo.c:830:11: branch_false: following ‘false’ branch (when ‘dred_duration <= 0’)...
opus-1.6/src/opus_demo.c:842:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:842:8: branch_false: following ‘false’ branch (when ‘encode_only != 0’)...
opus-1.6/src/opus_demo.c:859:5: branch_false: ...to here
opus-1.6/src/opus_demo.c:884:8: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:888:8: branch_false: ...to here
opus-1.6/src/opus_demo.c:898:7: branch_false: following ‘false’ branch (when ‘delayed_decision == 0’)...
opus-1.6/src/opus_demo.c:921:16: branch_false: ...to here
opus-1.6/src/opus_demo.c:928:12: branch_true: following ‘true’ branch (when ‘stop == 0’)...
opus-1.6/src/opus_demo.c:930:12: branch_true: ...to here
opus-1.6/src/opus_demo.c:930:12: branch_false: following ‘false’ branch (when ‘delayed_celt == 0’)...
opus-1.6/src/opus_demo.c:934:19: branch_false: ...to here
opus-1.6/src/opus_demo.c:934:19: branch_false: following ‘false’ branch (when ‘random_framesize == 0’)...
opus-1.6/src/opus_demo.c:956:12: branch_false: ...to here
opus-1.6/src/opus_demo.c:956:12: branch_false: following ‘false’ branch (when ‘random_fec == 0’)...
opus-1.6/src/opus_demo.c:960:12: branch_false: ...to here
opus-1.6/src/opus_demo.c:960:12: branch_false: following ‘false’ branch (when ‘decode_only == 0’)...
opus-1.6/src/opus_demo.c:986:16: branch_false: ...to here
opus-1.6/src/opus_demo.c:986:16: branch_false: following ‘false’ branch (when ‘mode_list’ is NULL)...
opus-1.6/src/opus_demo.c:1002:68: branch_false: ...to here
opus-1.6/src/opus_demo.c:1005:16: branch_true: following ‘true’ branch (when ‘format == 0’)...
opus-1.6/src/opus_demo.c:1005:16: branch_true: ...to here
opus-1.6/src/opus_demo.c:1006:24: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:1029:17: branch_false: ...to here
opus-1.6/src/opus_demo.c:1029:16: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:1029:16: branch_false: ...to here
opus-1.6/src/opus_demo.c:1037:16: branch_false: following ‘false’ branch...
opus-1.6/src/opus_demo.c:1042:26: branch_false: ...to here
opus-1.6/src/opus_demo.c:1044:21: branch_true: following ‘true’ branch...
opus-1.6/src/opus_demo.c:1045:27: branch_true: ...to here
opus-1.6/src/opus_demo.c:1045:24: danger: use of uninitialized value ‘*<unknown>’ here
# 1043|               remaining = frame_size-nb_encoded;
# 1044|               for(i=0;i<remaining*channels;i++)
# 1045|->                in[i] = in[nb_encoded*channels+i];
# 1046|               if (sweep_bps!=0)
# 1047|               {

Error: CPPCHECK_WARNING (CWE-457): [#def148]
opus-1.6/src/opus_encoder.c:1306: warning[uninitvar]: Uninitialized variable: analysis_info.activity_probability
# 1304|       /* Track the peak signal energy */
# 1305|   #ifndef DISABLE_FLOAT_API
# 1306|->     if (!analysis_info.valid || analysis_info.activity_probability > DTX_ACTIVITY_THRESHOLD)
# 1307|   #endif
# 1308|       {

Error: CPPCHECK_WARNING (CWE-457): [#def149]
opus-1.6/src/opus_encoder.c:2678: warning[uninitvar]: Uninitialized variable: in
# 2676|      for (i=0;i<frame_size*st->channels;i++)
# 2677|         in[i] = INT16TORES(pcm[i]);
# 2678|->    ret = opus_encode_native(st, in, frame_size, data, max_data_bytes, 16,
# 2679|                               pcm, analysis_frame_size, 0, -2, st->channels, downmix_int, 1);
# 2680|      RESTORE_STACK;

Error: CPPCHECK_WARNING (CWE-457): [#def150]
opus-1.6/src/opus_encoder.c:2713: warning[uninitvar]: Uninitialized variable: in
# 2711|      for (i=0;i<frame_size*st->channels;i++)
# 2712|         in[i] = INT24TORES(pcm[i]);
# 2713|->    ret = opus_encode_native(st, in, frame_size, data, max_data_bytes, MAX_ENCODING_DEPTH,
# 2714|                               pcm, analysis_frame_size, 0, -2, st->channels, downmix_int24, 1);
# 2715|      RESTORE_STACK;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def151]
opus-1.6/src/opus_multistream_encoder.c:907:80: warning[-Wanalyzer-null-dereference]: dereference of NULL 'celt_mode'
opus-1.6/src/opus_multistream_encoder.c:1131:5: enter_function: entry to 'opus_multistream_encode_float'
opus-1.6/src/opus_multistream_encoder.c:1139:11: call_function: calling 'opus_multistream_encode_native' from 'opus_multistream_encode_float'
#  905|      if (st->mapping_type == MAPPING_TYPE_SURROUND && st->application != OPUS_APPLICATION_RESTRICTED_SILK)
#  906|      {
#  907|->       surround_analysis(celt_mode, pcm, bandSMR, mem, preemph_mem, frame_size, celt_mode->overlap, st->layout.nb_channels, Fs, copy_channel_in, st->arch);
#  908|      }
#  909|   

Error: COMPILER_WARNING (CWE-457): [#def152]
opus-1.6/src/opus_projection_decoder.c:184:3: warning[-Wmaybe-uninitialized]: 'buf.1_83' may be used uninitialized
#  184 |   mapping_matrix_init(get_dec_demixing_matrix(st), channels, nb_input_streams, 0,
#      |   ^
opus-1.6/src/mapping_matrix.c: scope_hint: In function 'opus_projection_decoder_create.constprop'
opus-1.6/src/mapping_matrix.c:63:6: note: by argument 5 of type 'const opus_int16 *' to 'mapping_matrix_init' declared here
#   63 | void mapping_matrix_init(MappingMatrix * const matrix,
#      |      ^
#  182|     }
#  183|   
#  184|->   mapping_matrix_init(get_dec_demixing_matrix(st), channels, nb_input_streams, 0,
#  185|       buf, demixing_matrix_size);
#  186|   

Error: CPPCHECK_WARNING (CWE-457): [#def153]
opus-1.6/src/opus_projection_decoder.c:192: warning[uninitvar]: Uninitialized variable: mapping
#  190|   
#  191|     ret = opus_multistream_decoder_init(
#  192|->     get_multistream_decoder(st), Fs, channels, streams, coupled_streams, mapping);
#  193|     RESTORE_STACK;
#  194|     return ret;

Error: CPPCHECK_WARNING (CWE-457): [#def154]
opus-1.6/src/opus_projection_encoder.c:360: warning[uninitvar]: Uninitialized variable: mapping
#  358|     ms_encoder = get_multistream_encoder(st);
#  359|     ret = opus_multistream_encoder_init(ms_encoder, Fs, channels, *streams,
#  360|->                                       *coupled_streams, mapping, application);
#  361|     return ret;
#  362|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def155]
opus-1.6/src/repacketizer_demo.c:54:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "w")’
opus-1.6/src/repacketizer_demo.c:58:5: enter_function: entry to ‘main’
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: following ‘false’ branch (when ‘argc > 2’)...
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:105:11: acquire_resource: opened here
opus-1.6/src/repacketizer_demo.c:106:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:113:9: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:119:16: branch_true: following ‘true’ branch (when ‘i < merge’)...
opus-1.6/src/repacketizer_demo.c:122:14: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:122:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:135:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:137:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:150:14: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:150:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:163:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:164:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:176:16: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:177:13: branch_true: following ‘true’ branch...
opus-1.6/src/repacketizer_demo.c:179:13: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:135:19: call_function: inlined call to ‘char_to_int’ from ‘main’
#   52|   static opus_uint32 char_to_int(unsigned char ch[4])
#   53|   {
#   54|->     return ((opus_uint32)ch[0]<<24) | ((opus_uint32)ch[1]<<16)
#   55|            | ((opus_uint32)ch[2]<< 8) |  (opus_uint32)ch[3];
#   56|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
opus-1.6/src/repacketizer_demo.c:54:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "w")’
opus-1.6/src/repacketizer_demo.c:58:5: enter_function: entry to ‘main’
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: following ‘false’ branch (when ‘argc > 2’)...
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:105:11: acquire_memory: allocated here
opus-1.6/src/repacketizer_demo.c:106:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:113:9: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:119:16: branch_true: following ‘true’ branch (when ‘i < merge’)...
opus-1.6/src/repacketizer_demo.c:122:14: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:122:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:135:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:137:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:150:14: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:150:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:163:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:164:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:176:16: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:177:13: branch_true: following ‘true’ branch...
opus-1.6/src/repacketizer_demo.c:179:13: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:135:19: call_function: inlined call to ‘char_to_int’ from ‘main’
#   52|   static opus_uint32 char_to_int(unsigned char ch[4])
#   53|   {
#   54|->     return ((opus_uint32)ch[0]<<24) | ((opus_uint32)ch[1]<<16)
#   55|            | ((opus_uint32)ch[2]<< 8) |  (opus_uint32)ch[3];
#   56|   }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def157]
opus-1.6/src/repacketizer_demo.c:198:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
opus-1.6/src/repacketizer_demo.c:58:5: enter_function: entry to ‘main’
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: following ‘false’ branch (when ‘argc > 2’)...
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:106:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:113:9: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:119:16: branch_true: following ‘true’ branch (when ‘i < merge’)...
opus-1.6/src/repacketizer_demo.c:122:14: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:122:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:135:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:137:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:150:14: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:150:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:163:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:164:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:176:16: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:177:13: branch_true: following ‘true’ branch...
opus-1.6/src/repacketizer_demo.c:179:13: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:194:15: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:198:29: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:198:25: danger: out-of-bounds read from byte -4 till byte -1 but ‘rng’ starts at byte 0
#  196|                  return EXIT_FAILURE;
#  197|               }
#  198|->             int_to_char(rng[nb_packets-1], int_field);
#  199|               if (fwrite(int_field, 1, 4, fout)!=4) {
#  200|                  fprintf(stderr, "Error writing.\n");

Error: GCC_ANALYZER_WARNING (CWE-127): [#def158]
opus-1.6/src/repacketizer_demo.c:224:31: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
opus-1.6/src/repacketizer_demo.c:58:5: enter_function: entry to ‘main’
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: following ‘false’ branch (when ‘argc > 2’)...
opus-1.6/src/repacketizer_demo.c:69:7: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:76:10: branch_false: following ‘false’ branch (when the strings are non-equal)...
opus-1.6/src/repacketizer_demo.c:90:18: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:90:17: branch_true: following ‘true’ branch (when the strings are equal)...
opus-1.6/src/repacketizer_demo.c:74:22: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:100:6: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:106:6: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:113:9: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:119:16: branch_true: following ‘true’ branch (when ‘i < merge’)...
opus-1.6/src/repacketizer_demo.c:122:14: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:122:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:135:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:137:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:150:14: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:150:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:163:19: call_function: inlined call to ‘char_to_int’ from ‘main’
opus-1.6/src/repacketizer_demo.c:164:13: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:176:16: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:177:13: branch_true: following ‘true’ branch...
opus-1.6/src/repacketizer_demo.c:179:13: branch_true: ...to here
opus-1.6/src/repacketizer_demo.c:219:19: branch_false: following ‘false’ branch...
opus-1.6/src/repacketizer_demo.c:223:23: branch_false: ...to here
opus-1.6/src/repacketizer_demo.c:224:31: danger: out-of-bounds read from byte -4 till byte -1 but ‘rng’ starts at byte 0
#  222|                  }
#  223|                  if (i==nb_frames-1)
#  224|->                   int_to_char(rng[nb_packets-1], int_field);
#  225|                  else
#  226|                     int_to_char(0, int_field);

Error: CPPCHECK_WARNING (CWE-476): [#def159]
opus-1.6/tests/test_opus_api.c:245: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dec2
#  243|      /*Reset the decoder*/
#  244|      dec2=malloc(opus_decoder_get_size(2));
#  245|->    memcpy(dec2,dec,opus_decoder_get_size(2));
#  246|      if(opus_decoder_ctl(dec, OPUS_RESET_STATE)!=OPUS_OK)test_failed();
#  247|      if(memcmp(dec2,dec,opus_decoder_get_size(2))==0)test_failed();

Error: CPPCHECK_WARNING (CWE-476): [#def160]
opus-1.6/tests/test_opus_api.c:247: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dec2
#  245|      memcpy(dec2,dec,opus_decoder_get_size(2));
#  246|      if(opus_decoder_ctl(dec, OPUS_RESET_STATE)!=OPUS_OK)test_failed();
#  247|->    if(memcmp(dec2,dec,opus_decoder_get_size(2))==0)test_failed();
#  248|      free(dec2);
#  249|      fprintf(stdout,"    OPUS_RESET_STATE ............................. OK.\n");

Error: CPPCHECK_WARNING (CWE-476): [#def161]
opus-1.6/tests/test_opus_common.h:34: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _t
#   32|        if(_y<3)for(i=0;i<_y;i++)*(--*_p)=_t[i+1];
#   33|     }else{
#   34|->      _t[_x]=_t[_x-_y];
#   35|        deb2_impl(_t,_p,_k,_x+1,_y);
#   36|        for(i=_t[_x-_y]+1;i<_k;i++){

Error: CPPCHECK_WARNING (CWE-476): [#def162]
opus-1.6/tests/test_opus_common.h:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _t
#   34|        _t[_x]=_t[_x-_y];
#   35|        deb2_impl(_t,_p,_k,_x+1,_y);
#   36|->      for(i=_t[_x-_y]+1;i<_k;i++){
#   37|          _t[_x]=i;
#   38|          deb2_impl(_t,_p,_k,_x+1,_x);

Error: CPPCHECK_WARNING (CWE-476): [#def163]
opus-1.6/tests/test_opus_common.h:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _t
#   35|        deb2_impl(_t,_p,_k,_x+1,_y);
#   36|        for(i=_t[_x-_y]+1;i<_k;i++){
#   37|->        _t[_x]=i;
#   38|          deb2_impl(_t,_p,_k,_x+1,_x);
#   39|        }

Error: CPPCHECK_WARNING (CWE-476): [#def164]
opus-1.6/tests/test_opus_common.h:49: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: t
#   47|      unsigned char *t;
#   48|      t=malloc(sizeof(unsigned char)*_k*2);
#   49|->    memset(t,0,sizeof(unsigned char)*_k*2);
#   50|      p=&_res[_k*_k];
#   51|      deb2_impl(t,&p,_k,1,1);

Error: CPPCHECK_WARNING (CWE-476): [#def165]
opus-1.6/tests/test_opus_custom.c:169: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: decC_copy
#  167|         decC = (OpusCustomDecoder*)params.decoder;
#  168|         decC_copy = malloc(size);
#  169|->       memcpy(decC_copy, decC, size);
#  170|      }
#  171|      else {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def166]
opus-1.6/tests/test_opus_custom.c:169:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘decC_copy’ where non-null expected
opus-1.6/tests/test_opus_custom.c:676:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_custom.c:686:7: branch_false: following ‘false’ branch (when ‘_argc <= 1’)...
opus-1.6/tests/test_opus_custom.c:688:7: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:688:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: following ‘false’ branch (when ‘env_seed’ is NULL)...
opus-1.6/tests/test_opus_custom.c:695:28: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:699:6: branch_false: following ‘false’ branch (when ‘env_used == 0’)...
opus-1.6/tests/test_opus_custom.c:701:4: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:706:4: call_function: calling ‘test_opus_custom’ from ‘main’
#  167|         decC = (OpusCustomDecoder*)params.decoder;
#  168|         decC_copy = malloc(size);
#  169|->       memcpy(decC_copy, decC, size);
#  170|      }
#  171|      else {

Error: CPPCHECK_WARNING (CWE-476): [#def167]
opus-1.6/tests/test_opus_custom.c:175: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dec_copy
#  173|         dec = (OpusDecoder*)params.decoder;
#  174|         dec_copy = malloc(size);
#  175|->       memcpy(dec_copy, dec, size);
#  176|      }
#  177|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def168]
opus-1.6/tests/test_opus_custom.c:175:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dec_copy’ where non-null expected
opus-1.6/tests/test_opus_custom.c:676:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_custom.c:686:7: branch_false: following ‘false’ branch (when ‘_argc <= 1’)...
opus-1.6/tests/test_opus_custom.c:688:7: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:688:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: following ‘false’ branch (when ‘env_seed’ is NULL)...
opus-1.6/tests/test_opus_custom.c:695:28: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:699:6: branch_false: following ‘false’ branch (when ‘env_used == 0’)...
opus-1.6/tests/test_opus_custom.c:701:4: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:706:4: call_function: calling ‘test_opus_custom’ from ‘main’
#  173|         dec = (OpusDecoder*)params.decoder;
#  174|         dec_copy = malloc(size);
#  175|->       memcpy(dec_copy, dec, size);
#  176|      }
#  177|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def169]
opus-1.6/tests/test_opus_custom.c:184:19: warning[-Wanalyzer-null-argument]: use of NULL ‘generate_sine_sweep(5.0e-1, params.encoder_bit_depth,  params.sample_rate,  params.num_channels,  params.float_encode, 6.0e+1, & input_samples)’ where non-null expected
opus-1.6/tests/test_opus_custom.c:676:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_custom.c:686:7: branch_false: following ‘false’ branch (when ‘_argc <= 1’)...
opus-1.6/tests/test_opus_custom.c:688:7: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:688:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: following ‘false’ branch (when ‘env_seed’ is NULL)...
opus-1.6/tests/test_opus_custom.c:695:28: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:699:6: branch_false: following ‘false’ branch (when ‘env_used == 0’)...
opus-1.6/tests/test_opus_custom.c:701:4: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:706:4: call_function: calling ‘test_opus_custom’ from ‘main’
#  182|            float* input = (float*)inbuf;
#  183|            if (params.custom_encode) {
#  184|->             len = opus_custom_encode_float(encC,
#  185|                                              &input[samp_count*num_channels],
#  186|                                              frame_size,

Error: GCC_ANALYZER_WARNING (CWE-688): [#def170]
opus-1.6/tests/test_opus_custom.c:213:22: warning[-Wanalyzer-null-argument]: use of NULL ‘generate_sine_sweep(5.0e-1, params.encoder_bit_depth,  params.sample_rate,  params.num_channels,  params.float_encode, 6.0e+1, & input_samples)’ where non-null expected
opus-1.6/tests/test_opus_custom.c:676:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_custom.c:686:7: branch_false: following ‘false’ branch (when ‘_argc <= 1’)...
opus-1.6/tests/test_opus_custom.c:688:7: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:688:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: following ‘false’ branch (when ‘env_seed’ is NULL)...
opus-1.6/tests/test_opus_custom.c:695:28: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:699:6: branch_false: following ‘false’ branch (when ‘env_used == 0’)...
opus-1.6/tests/test_opus_custom.c:701:4: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:706:4: call_function: calling ‘test_opus_custom’ from ‘main’
#  211|               if (params.encoder_bit_depth == 24) {
#  212|                  opus_int32* input = (opus_int32*)inbuf;
#  213|->                len = opus_custom_encode24(encC,
#  214|                                             &input[samp_count*num_channels],
#  215|                                             frame_size,

Error: GCC_ANALYZER_WARNING (CWE-688): [#def171]
opus-1.6/tests/test_opus_custom.c:226:22: warning[-Wanalyzer-null-argument]: use of NULL ‘generate_sine_sweep(5.0e-1, params.encoder_bit_depth,  params.sample_rate,  params.num_channels,  params.float_encode, 6.0e+1, & input_samples)’ where non-null expected
opus-1.6/tests/test_opus_custom.c:676:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_custom.c:686:7: branch_false: following ‘false’ branch (when ‘_argc <= 1’)...
opus-1.6/tests/test_opus_custom.c:688:7: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:688:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:691:11: branch_false: following ‘false’ branch (when ‘env_seed’ is NULL)...
opus-1.6/tests/test_opus_custom.c:695:28: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:699:6: branch_false: following ‘false’ branch (when ‘env_used == 0’)...
opus-1.6/tests/test_opus_custom.c:701:4: branch_false: ...to here
opus-1.6/tests/test_opus_custom.c:706:4: call_function: calling ‘test_opus_custom’ from ‘main’
#  224|               else {
#  225|                  opus_int16* input = (opus_int16*)inbuf;
#  226|->                len = opus_custom_encode(encC,
#  227|                                           &input[samp_count*num_channels],
#  228|                                           frame_size,

Error: CPPCHECK_WARNING (CWE-476): [#def172]
opus-1.6/tests/test_opus_decode.c:73: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: outbuf_int
#   71|   
#   72|      outbuf_int=malloc(sizeof(short)*(MAX_FRAME_SAMP+16)*2);
#   73|->    for(i=0;i<(MAX_FRAME_SAMP+16)*2;i++)outbuf_int[i]=32749;
#   74|      outbuf=&outbuf_int[8*2];
#   75|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def173]
opus-1.6/tests/test_opus_decode.c:73:40: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘outbuf_int’
opus-1.6/tests/test_opus_decode.c:70:6: branch_false: following ‘false’ branch (when ‘packet’ is non-NULL)...
opus-1.6/tests/test_opus_decode.c:72:15: branch_false: ...to here
opus-1.6/tests/test_opus_decode.c:72:15: acquire_memory: this call could return NULL
opus-1.6/tests/test_opus_decode.c:73:12: branch_true: following ‘true’ branch (when ‘i != 11552’)...
opus-1.6/tests/test_opus_decode.c:73:50: branch_true: ...to here
opus-1.6/tests/test_opus_decode.c:73:40: danger: ‘outbuf_int + (long unsigned int)i * 2’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   71|   
#   72|      outbuf_int=malloc(sizeof(short)*(MAX_FRAME_SAMP+16)*2);
#   73|->    for(i=0;i<(MAX_FRAME_SAMP+16)*2;i++)outbuf_int[i]=32749;
#   74|      outbuf=&outbuf_int[8*2];
#   75|   

Error: CPPCHECK_WARNING (CWE-457): [#def174]
opus-1.6/tests/test_opus_dred.c:74: warning[uninitvar]: Uninitialized variable: payload
#   72|         for (j=0;j<len;j++)
#   73|            payload[j] = fast_rand()&0xFF;
#   74|->       res1 = opus_dred_parse(dred_dec, dred, payload, len, 48000, 48000, &dred_end, fast_rand()&0x1);
#   75|         if (res1 > 0)
#   76|         {

Error: CPPCHECK_WARNING (CWE-476): [#def175]
opus-1.6/tests/test_opus_encode.c:66: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   64|      j=0;
#   65|      /*60ms silence*/
#   66|->    for(i=0;i<2880;i++)buf[i*2]=buf[i*2+1]=0;
#   67|      for(i=2880;i<len;i++)
#   68|      {

Error: CPPCHECK_WARNING (CWE-476): [#def176]
opus-1.6/tests/test_opus_encode.c:80: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   78|        v1=(c1+128)>>8;
#   79|        v2=(c2+128)>>8;
#   80|->      buf[i*2]=v1>32767?32767:(v1<-32768?-32768:v1);
#   81|        buf[i*2+1]=v2>32767?32767:(v2<-32768?-32768:v2);
#   82|        if(i%6==0)j++;

Error: CPPCHECK_WARNING (CWE-476): [#def177]
opus-1.6/tests/test_opus_encode.c:81: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   79|        v2=(c2+128)>>8;
#   80|        buf[i*2]=v1>32767?32767:(v1<-32768?-32768:v1);
#   81|->      buf[i*2+1]=v2>32767?32767:(v2<-32768?-32768:v2);
#   82|        if(i%6==0)j++;
#   83|      }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def178]
opus-1.6/tests/test_opus_encode.c:385:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc((long unsigned int)opus_decoder_get_size(2))’ where non-null expected
opus-1.6/tests/test_opus_encode.c:689:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_encode.c:701:6: branch_false: following ‘false’ branch (when ‘_argc <= 1’)...
opus-1.6/tests/test_opus_encode.c:703:7: branch_false: ...to here
opus-1.6/tests/test_opus_encode.c:703:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_encode.c:705:11: branch_false: ...to here
opus-1.6/tests/test_opus_encode.c:712:10: branch_false: following ‘false’ branch (when ‘args >= _argc’)...
opus-1.6/tests/test_opus_encode.c:733:13: branch_false: ...to here
opus-1.6/tests/test_opus_encode.c:734:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_encode.c:735:84: branch_false: ...to here
opus-1.6/tests/test_opus_encode.c:743:4: call_function: calling ‘run_test1’ from ‘main’
#  383|   
#  384|      dec_err[0]=(OpusDecoder *)malloc(opus_decoder_get_size(2));
#  385|->    memcpy(dec_err[0],dec,opus_decoder_get_size(2));
#  386|      dec_err[1] = opus_decoder_create(48000, 1, &err);
#  387|      dec_err[2] = opus_decoder_create(24000, 2, &err);

Error: CPPCHECK_WARNING (CWE-476): [#def179]
opus-1.6/tests/test_opus_extensions.c:396: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  394|         unsigned char *buf = malloc(LENSIZE+1);
#  395|         len = LENSIZE+1;
#  396|->       buf[0] = 33<<1 | 1;
#  397|         memset(buf + 1, 0xFF, LENSIZE - 1);
#  398|         buf[LENSIZE] = 0xFE;

Error: CPPCHECK_WARNING (CWE-682): [#def180]
opus-1.6/tests/test_opus_extensions.c:397: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  395|         len = LENSIZE+1;
#  396|         buf[0] = 33<<1 | 1;
#  397|->       memset(buf + 1, 0xFF, LENSIZE - 1);
#  398|         buf[LENSIZE] = 0xFE;
#  399|         result = opus_packet_extensions_parse(buf, len, ext_out, &nb_ext, 1);

Error: CPPCHECK_WARNING (CWE-476): [#def181]
opus-1.6/tests/test_opus_extensions.c:398: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  396|         buf[0] = 33<<1 | 1;
#  397|         memset(buf + 1, 0xFF, LENSIZE - 1);
#  398|->       buf[LENSIZE] = 0xFE;
#  399|         result = opus_packet_extensions_parse(buf, len, ext_out, &nb_ext, 1);
#  400|         expect_true(result == OPUS_INVALID_PACKET, "expected OPUS_INVALID_PACKET");

Error: CPPCHECK_WARNING (CWE-457): [#def182]
opus-1.6/tests/test_opus_extensions.c:601: warning[uninitvar]: Uninitialized variable: payload
#  599|         nb_frames = (fast_rand()%48) + 1;
#  600|         result =
#  601|->        opus_packet_extensions_parse(payload, len, ext_out, &nb_ext, nb_frames);
#  602|         expect_true(result == OPUS_OK || result == OPUS_BUFFER_TOO_SMALL || result == OPUS_INVALID_PACKET, "expected OPUS_OK, OPUS_BUFFER_TOO_SMALL or OPUS_INVALID_PACKET");
#  603|         /* Even if parsing fails, check that the extensions that got extracted make sense. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
opus-1.6/tests/test_opus_projection.c:105:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(120)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  103|     simple_matrix_size = mapping_matrix_get_size(simple_matrix_params.rows,
#  104|       simple_matrix_params.cols);
#  105|->   if (!simple_matrix_size)
#  106|       test_failed();
#  107|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
opus-1.6/tests/test_opus_projection.c:105:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(160)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  103|     simple_matrix_size = mapping_matrix_get_size(simple_matrix_params.rows,
#  104|       simple_matrix_params.cols);
#  105|->   if (!simple_matrix_size)
#  106|       test_failed();
#  107|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
opus-1.6/tests/test_opus_projection.c:105:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(80)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  103|     simple_matrix_size = mapping_matrix_get_size(simple_matrix_params.rows,
#  104|       simple_matrix_params.cols);
#  105|->   if (!simple_matrix_size)
#  106|       test_failed();
#  107|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
opus-1.6/tests/test_opus_projection.c:108:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(120)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  106|       test_failed();
#  107|   
#  108|->   simple_matrix = (MappingMatrix *)opus_alloc(simple_matrix_size);
#  109|     mapping_matrix_init(simple_matrix, simple_matrix_params.rows,
#  110|       simple_matrix_params.cols, simple_matrix_params.gain, simple_matrix_data,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
opus-1.6/tests/test_opus_projection.c:108:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(160)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  106|       test_failed();
#  107|   
#  108|->   simple_matrix = (MappingMatrix *)opus_alloc(simple_matrix_size);
#  109|     mapping_matrix_init(simple_matrix, simple_matrix_params.rows,
#  110|       simple_matrix_params.cols, simple_matrix_params.gain, simple_matrix_data,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
opus-1.6/tests/test_opus_projection.c:108:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(80)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  106|       test_failed();
#  107|   
#  108|->   simple_matrix = (MappingMatrix *)opus_alloc(simple_matrix_size);
#  109|     mapping_matrix_init(simple_matrix, simple_matrix_params.rows,
#  110|       simple_matrix_params.cols, simple_matrix_params.gain, simple_matrix_data,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def189]
opus-1.6/tests/test_opus_projection.c:116:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(120)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  114|     for (i = 0; i < SIMPLE_MATRIX_INPUT_SIZE; i++)
#  115|     {
#  116|->     input_pcm[i] = INT16TORES(input_int16[i]);
#  117|     }
#  118|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def190]
opus-1.6/tests/test_opus_projection.c:121:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(160)’
opus-1.6/tests/test_opus_projection.c:364:5: enter_function: entry to ‘main’
opus-1.6/tests/test_opus_projection.c:372:3: call_function: calling ‘test_simple_matrix’ from ‘main’
#  119|     /* _in_short */
#  120|     for (i = 0; i < SIMPLE_MATRIX_OUTPUT_SIZE; i++)
#  121|->     output_pcm[i] = 0;
#  122|     for (i = 0; i < simple_matrix->rows; i++)
#  123|     {

Error: CPPCHECK_WARNING (CWE-457): [#def191]
opus-1.6/tests/test_opus_projection.c:227: warning[uninitvar]: Uninitialized variable: dec_error
#  225|     is_channels_valid = (order_plus_one >= 2 && order_plus_one <= 6) &&
#  226|       (nondiegetic_channels == 0 || nondiegetic_channels == 2);
#  227|->   is_projection_valid = (enc_error == OPUS_OK && dec_error == OPUS_OK);
#  228|     if (is_channels_valid ^ is_projection_valid)
#  229|     {

Error: CPPCHECK_WARNING (CWE-476): [#def192]
opus-1.6/tests/test_opus_projection.c:247: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a
#  245|      c = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  246|      d = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  247|->    memset(a, 0, sizeof(opus_int32) * channels);
#  248|      memset(b, 0, sizeof(opus_int32) * channels);
#  249|      memset(c, 0, sizeof(opus_int32) * channels);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def193]
opus-1.6/tests/test_opus_projection.c:247:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘a’ where non-null expected
opus-1.6/tests/test_opus_projection.c:275:6: enter_function: entry to ‘test_encode_decode’
opus-1.6/tests/test_opus_projection.c:299:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:309:5: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:310:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:315:11: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:317:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:330:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:337:3: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:337:3: call_function: calling ‘generate_music’ from ‘test_encode_decode’
#  245|      c = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  246|      d = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  247|->    memset(a, 0, sizeof(opus_int32) * channels);
#  248|      memset(b, 0, sizeof(opus_int32) * channels);
#  249|      memset(c, 0, sizeof(opus_int32) * channels);

Error: CPPCHECK_WARNING (CWE-476): [#def194]
opus-1.6/tests/test_opus_projection.c:248: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  246|      d = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  247|      memset(a, 0, sizeof(opus_int32) * channels);
#  248|->    memset(b, 0, sizeof(opus_int32) * channels);
#  249|      memset(c, 0, sizeof(opus_int32) * channels);
#  250|      memset(d, 0, sizeof(opus_int32) * channels);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def195]
opus-1.6/tests/test_opus_projection.c:248:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘b’ where non-null expected
opus-1.6/tests/test_opus_projection.c:275:6: enter_function: entry to ‘test_encode_decode’
opus-1.6/tests/test_opus_projection.c:299:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:309:5: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:310:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:315:11: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:317:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:330:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:337:3: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:337:3: call_function: calling ‘generate_music’ from ‘test_encode_decode’
#  246|      d = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  247|      memset(a, 0, sizeof(opus_int32) * channels);
#  248|->    memset(b, 0, sizeof(opus_int32) * channels);
#  249|      memset(c, 0, sizeof(opus_int32) * channels);
#  250|      memset(d, 0, sizeof(opus_int32) * channels);

Error: CPPCHECK_WARNING (CWE-476): [#def196]
opus-1.6/tests/test_opus_projection.c:249: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c
#  247|      memset(a, 0, sizeof(opus_int32) * channels);
#  248|      memset(b, 0, sizeof(opus_int32) * channels);
#  249|->    memset(c, 0, sizeof(opus_int32) * channels);
#  250|      memset(d, 0, sizeof(opus_int32) * channels);
#  251|      j=0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def197]
opus-1.6/tests/test_opus_projection.c:249:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘c’ where non-null expected
opus-1.6/tests/test_opus_projection.c:275:6: enter_function: entry to ‘test_encode_decode’
opus-1.6/tests/test_opus_projection.c:299:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:309:5: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:310:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:315:11: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:317:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:330:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:337:3: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:337:3: call_function: calling ‘generate_music’ from ‘test_encode_decode’
#  247|      memset(a, 0, sizeof(opus_int32) * channels);
#  248|      memset(b, 0, sizeof(opus_int32) * channels);
#  249|->    memset(c, 0, sizeof(opus_int32) * channels);
#  250|      memset(d, 0, sizeof(opus_int32) * channels);
#  251|      j=0;

Error: CPPCHECK_WARNING (CWE-476): [#def198]
opus-1.6/tests/test_opus_projection.c:250: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: d
#  248|      memset(b, 0, sizeof(opus_int32) * channels);
#  249|      memset(c, 0, sizeof(opus_int32) * channels);
#  250|->    memset(d, 0, sizeof(opus_int32) * channels);
#  251|      j=0;
#  252|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def199]
opus-1.6/tests/test_opus_projection.c:250:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘d’ where non-null expected
opus-1.6/tests/test_opus_projection.c:275:6: enter_function: entry to ‘test_encode_decode’
opus-1.6/tests/test_opus_projection.c:299:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:309:5: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:310:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:315:11: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:317:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:330:6: branch_false: following ‘false’ branch...
opus-1.6/tests/test_opus_projection.c:337:3: branch_false: ...to here
opus-1.6/tests/test_opus_projection.c:337:3: call_function: calling ‘generate_music’ from ‘test_encode_decode’
#  248|      memset(b, 0, sizeof(opus_int32) * channels);
#  249|      memset(c, 0, sizeof(opus_int32) * channels);
#  250|->    memset(d, 0, sizeof(opus_int32) * channels);
#  251|      j=0;
#  252|   

Error: CPPCHECK_WARNING (CWE-476): [#def200]
opus-1.6/tests/test_opus_projection.c:261: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a
#  259|         v=(((j*((j>>12)^((j>>10|j>>12)&26&j>>7)))&128)+128)<<15;
#  260|         r=fast_rand();v+=r&65535;v-=r>>16;
#  261|->       b[k]=v-a[k]+((b[k]*61+32)>>6);a[k]=v;
#  262|         c[k]=(30*(c[k]+b[k]+d[k])+32)>>6;d[k]=b[k];
#  263|         v=(c[k]+128)>>8;

Error: CPPCHECK_WARNING (CWE-476): [#def201]
opus-1.6/tests/test_opus_projection.c:261: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  259|         v=(((j*((j>>12)^((j>>10|j>>12)&26&j>>7)))&128)+128)<<15;
#  260|         r=fast_rand();v+=r&65535;v-=r>>16;
#  261|->       b[k]=v-a[k]+((b[k]*61+32)>>6);a[k]=v;
#  262|         c[k]=(30*(c[k]+b[k]+d[k])+32)>>6;d[k]=b[k];
#  263|         v=(c[k]+128)>>8;

Error: CPPCHECK_WARNING (CWE-476): [#def202]
opus-1.6/tests/test_opus_projection.c:262: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  260|         r=fast_rand();v+=r&65535;v-=r>>16;
#  261|         b[k]=v-a[k]+((b[k]*61+32)>>6);a[k]=v;
#  262|->       c[k]=(30*(c[k]+b[k]+d[k])+32)>>6;d[k]=b[k];
#  263|         v=(c[k]+128)>>8;
#  264|         buf[i*channels+k]=v>32767?32767:(v<-32768?-32768:v);

Error: CPPCHECK_WARNING (CWE-476): [#def203]
opus-1.6/tests/test_opus_projection.c:262: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c
#  260|         r=fast_rand();v+=r&65535;v-=r>>16;
#  261|         b[k]=v-a[k]+((b[k]*61+32)>>6);a[k]=v;
#  262|->       c[k]=(30*(c[k]+b[k]+d[k])+32)>>6;d[k]=b[k];
#  263|         v=(c[k]+128)>>8;
#  264|         buf[i*channels+k]=v>32767?32767:(v<-32768?-32768:v);

Error: CPPCHECK_WARNING (CWE-476): [#def204]
opus-1.6/tests/test_opus_projection.c:262: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: d
#  260|         r=fast_rand();v+=r&65535;v-=r>>16;
#  261|         b[k]=v-a[k]+((b[k]*61+32)>>6);a[k]=v;
#  262|->       c[k]=(30*(c[k]+b[k]+d[k])+32)>>6;d[k]=b[k];
#  263|         v=(c[k]+128)>>8;
#  264|         buf[i*channels+k]=v>32767?32767:(v<-32768?-32768:v);

Error: CPPCHECK_WARNING (CWE-476): [#def205]
opus-1.6/tests/test_opus_projection.c:263: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c
#  261|         b[k]=v-a[k]+((b[k]*61+32)>>6);a[k]=v;
#  262|         c[k]=(30*(c[k]+b[k]+d[k])+32)>>6;d[k]=b[k];
#  263|->       v=(c[k]+128)>>8;
#  264|         buf[i*channels+k]=v>32767?32767:(v<-32768?-32768:v);
#  265|         if(i%6==0)j++;

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-91.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameopus-1.6-2.fc44
store-results-to/tmp/tmpsqv50rl0/opus-1.6-2.fc44.tar.xz
time-created2026-08-03 18:57:41
time-finished2026-08-03 19:01:52
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpsqv50rl0/opus-1.6-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsqv50rl0/opus-1.6-2.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9