opus-1.5.2-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c:38: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c: scope_hint: In function 'compute_twiddles'
opus-1.5.2-build/opus-1.5.2/celt/_kiss_fft_guts.h:172:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'twiddles'
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c:421:7: note: in expansion of macro 'kf_cexp'
opus-1.5.2-build/opus-1.5.2/celt/_kiss_fft_guts.h:36: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c:444:32: note: in expansion of macro 'KISS_FFT_MALLOC'
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c: scope_hint: In function 'compute_twiddles'
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c:473:57: note: in expansion of macro 'KISS_FFT_MALLOC'
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c:473:57: note: in expansion of macro 'KISS_FFT_MALLOC'
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c: scope_hint: In function 'compute_twiddles'
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.c:421:7: note: in expansion of macro 'kf_cexp'
#  170|   #define  kf_cexp(x,phase) \
#  171|           do{ \
#  172|->                 (x)->r = KISS_FFT_COS(phase);\
#  173|                   (x)->i = KISS_FFT_SIN(phase);\
#  174|           }while(0)

Error: GCC_ANALYZER_WARNING (CWE-126): [#def2]
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c: scope_hint: In function 'deemphasis'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:308:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c: scope_hint: In function 'deemphasis'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:40: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER'
opus-1.5.2-build/opus-1.5.2/celt/kiss_fft.h:34: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/mdct.h:46: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:38: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:139:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:141:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:142:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:143:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:144:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:147:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:150:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:152:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:154:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:156:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:158:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER'
opus-1.5.2-build/opus-1.5.2/celt/mdct.h:107:39: note: in definition of macro 'clt_mdct_backward'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:298:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/cwrs.h:34: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/rate.h:43: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/bands.h:37: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:42: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:308:9: note: read of 8 bytes from after the end of 'out_syn'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:308:9: note: valid subscripts for 'out_syn' are '[0]' to '[1]'
#  306|         opus_val16  * OPUS_RESTRICT y;
#  307|         celt_sig m = mem[c];
#  308|->       x =in[c];
#  309|         y = pcm+c;
#  310|   #ifdef CUSTOM_MODES

Error: GCC_ANALYZER_WARNING (CWE-457): [#def3]
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:372:52: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*scratch[<unknown>]'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:277:27: note: in definition of macro 'SCALEOUT'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:372:34: note: in expansion of macro 'SIG2WORD16'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c: scope_hint: In function 'deemphasis'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:139:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:141:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:142:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:143:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:144:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:147:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:150:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:152:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:154:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:156:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:158:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER'
opus-1.5.2-build/opus-1.5.2/celt/mdct.h:107:39: note: in definition of macro 'clt_mdct_backward'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:298:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC'
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:277:27: note: in definition of macro 'SCALEOUT'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:372:34: note: in expansion of macro 'SIG2WORD16'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:277:27: note: in definition of macro 'SCALEOUT'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:372:34: note: in expansion of macro 'SIG2WORD16'
#  370|            {
#  371|               for (j=0;j<Nd;j++)
#  372|->                y[j*C] = SCALEOUT(SIG2WORD16(scratch[j*downsample]));
#  373|            }
#  374|         }

Error: CPPCHECK_WARNING (CWE-570): [#def4]
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:791: error[subtractPointers]: Subtracting pointers that point to different objects
#  789|               celt_fir(exc+MAX_PERIOD-exc_length, lpc+c*CELT_LPC_ORDER,
#  790|                     fir_tmp, exc_length, CELT_LPC_ORDER, st->arch);
#  791|->             OPUS_COPY(exc+MAX_PERIOD-exc_length, fir_tmp, exc_length);
#  792|            }
#  793|   

Error: CPPCHECK_WARNING (CWE-457): [#def5]
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1259: warning[uninitvar]: Uninitialized variable: offsets
# 1257|      ALLOC(fine_priority, nbEBands, int);
# 1258|   
# 1259|->    codedBands = clt_compute_allocation(mode, start, end, offsets, cap,
# 1260|            alloc_trim, &intensity, &dual_stereo, bits, &balance, pulses,
# 1261|            fine_quant, fine_priority, C, LM, dec, 0, 0, 0);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def6]
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c: scope_hint: In function 'opus_custom_decode'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1437:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*out[j]'
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c: scope_hint: In function 'opus_custom_decode'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:139:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:141:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:142:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:143:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:144:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:147:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:150:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:152:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:154:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:156:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/arch.h:83:34: note: in definition of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:158:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER'
opus-1.5.2-build/opus-1.5.2/celt/mdct.h:107:39: note: in definition of macro 'clt_mdct_backward'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c:298:4: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC'
opus-1.5.2-build/opus-1.5.2/celt/celt_decoder.c: scope_hint: In function 'opus_custom_decode'
# 1435|      if (ret>0)
# 1436|         for (j=0;j<C*ret;j++)
# 1437|->          pcm[j] = FLOAT2INT16 (out[j]);
# 1438|   
# 1439|      RESTORE_STACK;

Error: CPPCHECK_WARNING (CWE-570): [#def7]
opus-1.5.2-build/opus-1.5.2/celt/celt_encoder.c:641: error[subtractPointers]: Subtracting pointers that point to different objects
#  639|         if (isTransient && !narrow)
#  640|         {
#  641|->          OPUS_COPY(tmp_1, tmp, N);
#  642|            haar1(tmp_1, N>>LM, 1<<LM);
#  643|            L1 = l1_metric(tmp_1, N, LM+1, bias);

Error: CPPCHECK_WARNING (CWE-570): [#def8]
opus-1.5.2-build/opus-1.5.2/celt/celt_encoder.c:1027: error[subtractPointers]: Subtracting pointers that point to different objects
# 1025|               mask[i] = MAX16(mask[i], bandLogE[nbEBands+i]-noise_floor[i]);
# 1026|         }
# 1027|->       OPUS_COPY(sig, mask, end);
# 1028|         for (i=1;i<end;i++)
# 1029|            mask[i] = MAX16(mask[i], mask[i-1] - QCONST16(2.f, DB_SHIFT));

Error: CPPCHECK_WARNING (CWE-570): [#def9]
opus-1.5.2-build/opus-1.5.2/celt/celt_encoder.c:1873: error[subtractPointers]: Subtracting pointers that point to different objects
# 1871|      if (!secondMdct)
# 1872|      {
# 1873|->       OPUS_COPY(bandLogE2, bandLogE, C*nbEBands);
# 1874|      }
# 1875|   

Error: CPPCHECK_WARNING (CWE-457): [#def10]
opus-1.5.2-build/opus-1.5.2/celt/celt_lpc.c:167: warning[uninitvar]: Uninitialized variable: rnum
#  165|            xcorr_kernel_c(rnum, x+i-ord, sum_c, ord);
#  166|   #endif
#  167|->          xcorr_kernel(rnum, x+i-ord, sum, ord, arch);
#  168|   #if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
#  169|            celt_assert(memcmp(sum, sum_c, sizeof(sum)) == 0);

Error: CPPCHECK_WARNING (CWE-457): [#def11]
opus-1.5.2-build/opus-1.5.2/celt/celt_lpc.c:241: warning[uninitvar]: Uninitialized variable: rden
#  239|            xcorr_kernel_c(rden, y+i, sum_c, ord);
#  240|   #endif
#  241|->          xcorr_kernel(rden, y+i, sum, ord, arch);
#  242|   #if defined(OPUS_CHECK_ASM) && defined(FIXED_POINT)
#  243|            celt_assert(memcmp(sum, sum_c, sizeof(sum)) == 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
opus-1.5.2-build/opus-1.5.2/celt/entenc.c:62:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_entropy.c: scope_hint: In function ‘ec_enc_carry_out.part.0’
opus-1.5.2-build/opus-1.5.2/celt/ecintrin.h:32: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/entcode.h:35: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_entropy.c:38: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/entenc.c:191:3: note: in expansion of macro ‘celt_assert’
#   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): [#def13]
opus-1.5.2-build/opus-1.5.2/celt/modes.c: scope_hint: In function 'compute_ebands'
opus-1.5.2-build/opus-1.5.2/celt/modes.c:101:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'malloc(44)'
opus-1.5.2-build/opus-1.5.2/celt/modes.c: scope_hint: In function 'compute_ebands'
#   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): [#def14]
opus-1.5.2-build/opus-1.5.2/celt/modes.c: scope_hint: In function 'opus_custom_mode_destroy'
opus-1.5.2-build/opus-1.5.2/celt/modes.c:433:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*mode.allocVectors'
opus-1.5.2-build/opus-1.5.2/celt/modes.c: scope_hint: In function 'opus_custom_mode_destroy'
#  431|   #endif /* CUSTOM_MODES_ONLY */
#  432|      opus_free((opus_int16*)mode->eBands);
#  433|->    opus_free((unsigned char*)mode->allocVectors);
#  434|   
#  435|      opus_free((opus_val16*)mode->window);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def15]
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c:38: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c: scope_hint: In function 'surround_analysis'
opus-1.5.2-build/opus-1.5.2/celt/os_support.h:79:33: warning[-Wanalyzer-null-argument]: use of NULL 'mem' where non-null expected
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c:267:7: note: in expansion of macro 'OPUS_COPY'
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c:35: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:41: note: in definition of macro 'ALLOC'
opus-1.5.2-build/opus-1.5.2/src/opus_private.h:32: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c:34: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c:266:7: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c:267:7: note: in expansion of macro 'OPUS_COPY'
opus-1.5.2-build/opus-1.5.2/celt/os_support.h:79:48: note: in definition of macro 'OPUS_COPY'
opus-1.5.2-build/opus-1.5.2/src/opus_multistream_encoder.c:267:7: note: in expansion of macro 'OPUS_COPY'
<built-in>: note: argument 2 of '__builtin_memcpy' must be non-null
#   77|   /** Copy n elements from src to dst. The 0* term provides compile-time type checking  */
#   78|   #ifndef OVERRIDE_OPUS_COPY
#   79|-> #define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))
#   80|   #endif
#   81|   

Error: GCC_ANALYZER_WARNING: [#def16]
opus-1.5.2-build/opus-1.5.2/celt/mathops.h:39: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/src/analysis.c:38: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/src/analysis.c: scope_hint: In function 'tonality_analysis'
opus-1.5.2-build/opus-1.5.2/celt/os_support.h:79:33: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to 'memcpy'
opus-1.5.2-build/opus-1.5.2/src/analysis.c:556:8: note: in expansion of macro 'OPUS_COPY'
opus-1.5.2-build/opus-1.5.2/src/analysis.c:556:8: note: in expansion of macro 'OPUS_COPY'
opus-1.5.2-build/opus-1.5.2/celt/os_support.h:41: included_from: Included from here.
/usr/include/string.h:43:14: note: the behavior of 'memcpy' is undefined for overlapping buffers
#   77|   /** Copy n elements from src to dst. The 0* term provides compile-time type checking  */
#   78|   #ifndef OVERRIDE_OPUS_COPY
#   79|-> #define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))
#   80|   #endif
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def17]
opus-1.5.2-build/opus-1.5.2/celt/entenc.c:31: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_laplace.c:38: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/entenc.c: scope_hint: In function ‘ec_enc_done’
opus-1.5.2-build/opus-1.5.2/celt/os_support.h:90:29: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ptr’ where non-null expected
opus-1.5.2-build/opus-1.5.2/celt/entenc.c:288:5: note: in expansion of macro ‘OPUS_CLEAR’
opus-1.5.2-build/opus-1.5.2/celt/os_support.h:90:47: note: in definition of macro ‘OPUS_CLEAR’
opus-1.5.2-build/opus-1.5.2/celt/entenc.c:288:5: note: in expansion of macro ‘OPUS_CLEAR’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#   88|   /** Set n elements of dst to zero */
#   89|   #ifndef OVERRIDE_OPUS_CLEAR
#   90|-> #define OPUS_CLEAR(dst, n) (memset((dst), 0, (n)*sizeof(*(dst))))
#   91|   #endif
#   92|   

Error: CPPCHECK_WARNING (CWE-457): [#def18]
opus-1.5.2-build/opus-1.5.2/celt/pitch.c:356: warning[uninitvar]: Uninitialized variable: x_lp4
#  354|      maxcorr =
#  355|   #endif
#  356|->    celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch);
#  357|   
#  358|      find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch

Error: CPPCHECK_WARNING (CWE-457): [#def19]
opus-1.5.2-build/opus-1.5.2/celt/pitch.c:356: warning[uninitvar]: Uninitialized variable: y_lp4
#  354|      maxcorr =
#  355|   #endif
#  356|->    celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch);
#  357|   
#  358|      find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
opus-1.5.2-build/opus-1.5.2/celt/rate.c: scope_hint: In function 'compute_pulse_cache'
opus-1.5.2-build/opus-1.5.2/celt/rate.c:97:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*m.cache.index'
opus-1.5.2-build/opus-1.5.2/celt/rate.c: scope_hint: In function 'compute_pulse_cache'
#   95|            int k;
#   96|            int N = (eBands[j+1]-eBands[j])<<i>>1;
#   97|->          cindex[i*m->nbEBands+j] = -1;
#   98|            /* Find other bands that have the same size */
#   99|            for (k=0;k<=i;k++)

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

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_dft.c: scope_hint: In function ‘test1d’
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_dft.c:110:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘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: COMPILER_WARNING (CWE-457): [#def24]
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c: scope_hint: In function 'test1d.isra'
opus-1.5.2-build/opus-1.5.2/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: GCC_ANALYZER_WARNING (CWE-476): [#def25]
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c: scope_hint: In function ‘test1d’
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c:139:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’
#  137|   
#  138|       for (k=0;k<nfft;++k) {
#  139|->         in[k] = (rand() % 32768) - 16384;
#  140|       }
#  141|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c:143:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘window’
#  141|   
#  142|       for (k=0;k<nfft/2;++k) {
#  143|->        window[k] = Q15ONE;
#  144|       }
#  145|       for (k=0;k<nfft;++k) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c:157:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in_copy’
#  155|   
#  156|       for (k=0;k<nfft;++k)
#  157|->        in_copy[k] = in[k];
#  158|       /*for (k=0;k<nfft;++k) printf("%d %d ", in[k].r, in[k].i);printf("\n");*/
#  159|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c:163:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out’
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c:34: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/tests/test_unit_mdct.c:170:8: note: in expansion of macro ‘clt_mdct_forward’
#  161|       {
#  162|          for (k=0;k<nfft;++k)
#  163|->           out[k] = 0;
#  164|          clt_mdct_backward(cfg,in,out, window, nfft/2, shift, 1, arch);
#  165|          /* apply TDAC because clt_mdct_backward() no longer does that */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:98:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(inFile, "rb")’
#   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): [#def30]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:98:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(inFile, "rb")’
#   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): [#def31]
opus-1.5.2-build/opus-1.5.2/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: GCC_ANALYZER_WARNING (CWE-775): [#def32]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:105:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(inFile, "rb")’
#  103|      outFile = argv[2];
#  104|      fout = fopen(outFile, "wb");
#  105|->    if (fout==NULL)
#  106|      {
#  107|         fprintf(stderr, "failed to open output file: %s\n", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:105:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(inFile, "rb")’
#  103|      outFile = argv[2];
#  104|      fout = fopen(outFile, "wb");
#  105|->    if (fout==NULL)
#  106|      {
#  107|         fprintf(stderr, "failed to open output file: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-404): [#def34]
opus-1.5.2-build/opus-1.5.2/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): [#def35]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:133:27: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(inFile, "rb")’
#  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-775): [#def36]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:133:27: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(outFile, "wb")’
#  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): [#def37]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:133:27: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(inFile, "rb")’
#  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): [#def38]
opus-1.5.2-build/opus-1.5.2/doc/trivial_example.c:133:27: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(outFile, "wb")’
#  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): [#def39]
opus-1.5.2-build/opus-1.5.2/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: CPPCHECK_WARNING (CWE-457): [#def40]
opus-1.5.2-build/opus-1.5.2/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): [#def41]
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c: scope_hint: In function 'silk_Decode.isra'
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c:369:13: warning[-Wmaybe-uninitialized]: 'nSamplesOutDec' may be used uninitialized
#  369 |             silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) );
#      |             ^
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c:147:16: note: 'nSamplesOutDec' was declared here
#  147 |     opus_int32 nSamplesOutDec, LBRR_symbol;
#      |                ^
#  367|                   arch);
#  368|           } else {
#  369|->             silk_memset( &samplesOut1_tmp[ n ][ 2 ], 0, nSamplesOutDec * sizeof( opus_int16 ) );
#  370|           }
#  371|           channel_state[ n ].nFramesDecoded++;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def42]
opus-1.5.2-build/opus-1.5.2/silk/main.h:31: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c:32: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c: scope_hint: In function 'silk_Decode'
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c:380:64: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'nSamplesOutDec'
opus-1.5.2-build/opus-1.5.2/silk/SigProc_FIX.h:420:61: note: in definition of macro 'silk_memcpy'
opus-1.5.2-build/opus-1.5.2/celt/ecintrin.h:32: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/entcode.h:35: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/entenc.h:31: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/silk/API.h:34: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c:31: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/silk/dec_API.c:161:5: note: in expansion of macro 'celt_assert'
opus-1.5.2-build/opus-1.5.2/silk/SigProc_FIX.h:420:61: note: in definition of macro 'silk_memcpy'
#  378|           /* Buffering */
#  379|           silk_memcpy( samplesOut1_tmp[ 0 ], psDec->sStereo.sMid, 2 * sizeof( opus_int16 ) );
#  380|->         silk_memcpy( psDec->sStereo.sMid, &samplesOut1_tmp[ 0 ][ nSamplesOutDec ], 2 * sizeof( opus_int16 ) );
#  381|       }
#  382|   

Error: CPPCHECK_WARNING (CWE-457): [#def43]
opus-1.5.2-build/opus-1.5.2/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-457): [#def44]
opus-1.5.2-build/opus-1.5.2/silk/encode_pulses.c: scope_hint: In function 'silk_encode_pulses'
opus-1.5.2-build/opus-1.5.2/silk/encode_pulses.c:144:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*nRshifts[i]'
opus-1.5.2-build/opus-1.5.2/silk/encode_pulses.c:33: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC'
opus-1.5.2-build/opus-1.5.2/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC'
#  142|           sumBits_Q5 = silk_rate_levels_BITS_Q5[ signalType >> 1 ][ k ];
#  143|           for( i = 0; i < iter; i++ ) {
#  144|->             if( nRshifts[ i ] > 0 ) {
#  145|                   sumBits_Q5 += nBits_ptr[ SILK_MAX_PULSES + 1 ];
#  146|               } else {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def45]
opus-1.5.2-build/opus-1.5.2/silk/float/encode_frame_FLP.c: scope_hint: In function 'silk_encode_frame_FLP'
opus-1.5.2-build/opus-1.5.2/silk/float/encode_frame_FLP.c:301:54: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'best_sum[i]'
#  299|                           sum += abs( psEnc->sCmn.pulses[j] );
#  300|                       }
#  301|->                     if ( iter == 0 || (sum < best_sum[i] && !gain_lock[i]) ) {
#  302|                           best_sum[i] = sum;
#  303|                           best_gain_mult[i] = gainMult_Q8;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def46]
opus-1.5.2-build/opus-1.5.2/silk/float/encode_frame_FLP.c: scope_hint: In function 'silk_LBRR_encode_FLP'
opus-1.5.2-build/opus-1.5.2/silk/float/encode_frame_FLP.c:420:46: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
opus-1.5.2-build/opus-1.5.2/silk/float/encode_frame_FLP.c:420:46: note: read of 4 bytes from after the end of 'Gains_Q16'
opus-1.5.2-build/opus-1.5.2/silk/float/encode_frame_FLP.c:420:46: note: valid subscripts for 'Gains_Q16' are '[0]' to '[3]'
#  418|           /* Overwrite unquantized gains with quantized gains and convert back to Q0 from Q16 */
#  419|           for( k = 0; k <  psEnc->sCmn.nb_subfr; k++ ) {
#  420|->             psEncCtrl->Gains[ k ] = Gains_Q16[ k ] * ( 1.0f / 65536.0f );
#  421|           }
#  422|   

Error: CPPCHECK_WARNING (CWE-457): [#def47]
opus-1.5.2-build/opus-1.5.2/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-126): [#def48]
opus-1.5.2-build/opus-1.5.2/silk/float/process_gains_FLP.c: scope_hint: In function 'silk_process_gains_FLP'
opus-1.5.2-build/opus-1.5.2/silk/float/process_gains_FLP.c:80:43: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
opus-1.5.2-build/opus-1.5.2/silk/float/process_gains_FLP.c:80:43: note: read of 4 bytes from after the end of 'pGains_Q16'
opus-1.5.2-build/opus-1.5.2/silk/float/process_gains_FLP.c:80:43: note: valid subscripts for 'pGains_Q16' are '[0]' to '[3]'
#   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: CPPCHECK_WARNING (CWE-786): [#def49]
opus-1.5.2-build/opus-1.5.2/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): [#def50]
opus-1.5.2-build/opus-1.5.2/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): [#def51]
opus-1.5.2-build/opus-1.5.2/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): [#def52]
opus-1.5.2-build/opus-1.5.2/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): [#def53]
opus-1.5.2-build/opus-1.5.2/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: CPPCHECK_WARNING (CWE-786): [#def54]
opus-1.5.2-build/opus-1.5.2/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): [#def55]
opus-1.5.2-build/opus-1.5.2/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): [#def56]
opus-1.5.2-build/opus-1.5.2/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: CPPCHECK_WARNING (CWE-457): [#def57]
opus-1.5.2-build/opus-1.5.2/src/analysis.c:211: warning[uninitvar]: Uninitialized variable: tmp3x
#  209|            tmp3x[3*j+2] = tmp[j];
#  210|         }
#  211|->       silk_resampler_down2_hp(S, y, tmp3x, 3*subframe);
#  212|      }
#  213|      RESTORE_STACK;

Error: CPPCHECK_WARNING (CWE-457): [#def58]
opus-1.5.2-build/opus-1.5.2/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-457): [#def59]
opus-1.5.2-build/opus-1.5.2/src/opus_compare.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/src/opus_compare.c:233:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
opus-1.5.2-build/opus-1.5.2/src/opus_compare.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/src/opus_compare.c: scope_hint: In function ‘main’
#  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): [#def60]
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:890:42: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fbytes’
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’
#  888|               {
#  889|                   opus_int32 s;
#  890|->                 s=fbytes[2*i+1]<<8|fbytes[2*i];
#  891|                   s=((s&0xFFFF)^0x8000)-0x8000;
#  892|                   in[i+remaining*channels]=s;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def61]
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:892:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’
#  890|                   s=fbytes[2*i+1]<<8|fbytes[2*i];
#  891|                   s=((s&0xFFFF)^0x8000)-0x8000;
#  892|->                 in[i+remaining*channels]=s;
#  893|               }
#  894|               if (curr_read+remaining < frame_size)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def62]
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:910:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’
opus-1.5.2-build/opus-1.5.2/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’
#  908|               remaining = frame_size-nb_encoded;
#  909|               for(i=0;i<remaining*channels;i++)
#  910|->                in[i] = in[nb_encoded*channels+i];
#  911|               if (sweep_bps!=0)
#  912|               {

Error: CPPCHECK_WARNING (CWE-457): [#def63]
opus-1.5.2-build/opus-1.5.2/src/opus_encoder.c:2033: warning[uninitvar]: Uninitialized variable: pcm_silk
# 2031|                   pcm_silk[i] = FLOAT2INT16(st->delay_buffer[i]);
# 2032|   #endif
# 2033|->             silk_Encode( silk_enc, &st->silk_mode, pcm_silk, st->encoder_buffer, NULL, &zero, prefill, activity );
# 2034|               /* Prevent a second switch in the real encode call. */
# 2035|               st->silk_mode.opusCanSwitch = 0;

Error: CPPCHECK_WARNING (CWE-457): [#def64]
opus-1.5.2-build/opus-1.5.2/src/opus_encoder.c:2517: warning[uninitvar]: Uninitialized variable: in
# 2515|      for (i=0;i<frame_size*st->channels;i++)
# 2516|         in[i] = (1.0f/32768)*pcm[i];
# 2517|->    ret = opus_encode_native(st, in, frame_size, data, max_data_bytes, 16,
# 2518|                               pcm, analysis_frame_size, 0, -2, st->channels, downmix_int, 0);
# 2519|      RESTORE_STACK;

Error: CPPCHECK_WARNING (CWE-457): [#def65]
opus-1.5.2-build/opus-1.5.2/src/opus_projection_decoder.c:171: warning[uninitvar]: Uninitialized variable: mapping
#  169|   
#  170|     ret = opus_multistream_decoder_init(
#  171|->     get_multistream_decoder(st), Fs, channels, streams, coupled_streams, mapping);
#  172|     RESTORE_STACK;
#  173|     return ret;

Error: CPPCHECK_WARNING (CWE-457): [#def66]
opus-1.5.2-build/opus-1.5.2/src/opus_projection_encoder.c:346: warning[uninitvar]: Uninitialized variable: mapping
#  344|     ms_encoder = get_multistream_encoder(st);
#  345|     ret = opus_multistream_encoder_init(ms_encoder, Fs, channels, *streams,
#  346|->                                       *coupled_streams, mapping, application);
#  347|     return ret;
#  348|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c:54:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "w")’
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c: scope_hint: In function ‘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): [#def68]
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c:54:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "w")’
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c: scope_hint: In function ‘main’
opus-1.5.2-build/opus-1.5.2/src/repacketizer_demo.c: scope_hint: In function ‘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-688): [#def69]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_api.c: scope_hint: In function ‘test_dec_api’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_api.c:241:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dec2’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  239|      /*Reset the decoder*/
#  240|      dec2=malloc(opus_decoder_get_size(2));
#  241|->    memcpy(dec2,dec,opus_decoder_get_size(2));
#  242|      if(opus_decoder_ctl(dec, OPUS_RESET_STATE)!=OPUS_OK)test_failed();
#  243|      if(memcmp(dec2,dec,opus_decoder_get_size(2))==0)test_failed();

Error: GCC_ANALYZER_WARNING (CWE-688): [#def70]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_decode.c:46: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/tests/test_opus_common.h: scope_hint: In function ‘debruijn2’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_common.h:49:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘t’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#   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: GCC_ANALYZER_WARNING (CWE-476): [#def71]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_decode.c: scope_hint: In function ‘test_decoder_code0’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_decode.c:73:53: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘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: CPPCHECK_WARNING (CWE-457): [#def72]
opus-1.5.2-build/opus-1.5.2/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: GCC_ANALYZER_WARNING (CWE-476): [#def73]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_encode.c: scope_hint: In function ‘generate_music’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_encode.c:66:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_encode.c:238:27: note: in expansion of macro ‘RAND_SAMPLE’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_encode.c:249:24: note: in expansion of macro ‘RAND_SAMPLE’
#   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: GCC_ANALYZER_WARNING (CWE-688): [#def74]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_encode.c: scope_hint: In function ‘run_test1’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_encode.c:382:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc((long unsigned int)opus_decoder_get_size(2))’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  380|   
#  381|      dec_err[0]=(OpusDecoder *)malloc(opus_decoder_get_size(2));
#  382|->    memcpy(dec_err[0],dec,opus_decoder_get_size(2));
#  383|      dec_err[1] = opus_decoder_create(48000, 1, &err);
#  384|      dec_err[2] = opus_decoder_create(24000, 2, &err);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def75]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_encode.c:398:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘enccpy’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  396|         /*The opus state structures contain no pointers and can be freely copied*/
#  397|         enccpy=(OpusEncoder *)malloc(opus_encoder_get_size(2));
#  398|->       memcpy(enccpy,enc,opus_encoder_get_size(2));
#  399|         memset(enc,255,opus_encoder_get_size(2));
#  400|         opus_encoder_destroy(enc);

Error: CPPCHECK_WARNING (CWE-457): [#def76]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_extensions.c:327: warning[uninitvar]: Uninitialized variable: payload
#  325|            payload[j] = fast_rand()&0xFF;
#  326|         nb_ext = fast_rand()%(MAX_NB_EXTENSIONS+1);
#  327|->       result = opus_packet_extensions_parse(payload, len, ext_out, &nb_ext);
#  328|         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");
#  329|         /* Even if parsing fails, check that the extensions that got extracted make sense. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:110:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(120)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  108|     simple_matrix_size = mapping_matrix_get_size(simple_matrix_params.rows,
#  109|       simple_matrix_params.cols);
#  110|->   if (!simple_matrix_size)
#  111|       test_failed();
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:110:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(160)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  108|     simple_matrix_size = mapping_matrix_get_size(simple_matrix_params.rows,
#  109|       simple_matrix_params.cols);
#  110|->   if (!simple_matrix_size)
#  111|       test_failed();
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:110:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(80)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  108|     simple_matrix_size = mapping_matrix_get_size(simple_matrix_params.rows,
#  109|       simple_matrix_params.cols);
#  110|->   if (!simple_matrix_size)
#  111|       test_failed();
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:113:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(120)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  111|       test_failed();
#  112|   
#  113|->   simple_matrix = (MappingMatrix *)opus_alloc(simple_matrix_size);
#  114|     mapping_matrix_init(simple_matrix, simple_matrix_params.rows,
#  115|       simple_matrix_params.cols, simple_matrix_params.gain, simple_matrix_data,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:113:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(160)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  111|       test_failed();
#  112|   
#  113|->   simple_matrix = (MappingMatrix *)opus_alloc(simple_matrix_size);
#  114|     mapping_matrix_init(simple_matrix, simple_matrix_params.rows,
#  115|       simple_matrix_params.cols, simple_matrix_params.gain, simple_matrix_data,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:113:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(80)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  111|       test_failed();
#  112|   
#  113|->   simple_matrix = (MappingMatrix *)opus_alloc(simple_matrix_size);
#  114|     mapping_matrix_init(simple_matrix, simple_matrix_params.rows,
#  115|       simple_matrix_params.cols, simple_matrix_params.gain, simple_matrix_data,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:124:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(120)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  122|       input_val16[i] = input_int16[i];
#  123|   #else
#  124|->     input_val16[i] = (1/32768.f)*input_int16[i];
#  125|   #endif
#  126|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def84]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:130:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(160)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  128|     /* _in_short */
#  129|     for (i = 0; i < SIMPLE_MATRIX_OUTPUT_SIZE; i++)
#  130|->     output_val16[i] = 0;
#  131|     for (i = 0; i < simple_matrix->rows; i++)
#  132|     {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:143:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(80)’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’
#  141|     /* _out_short */
#  142|     for (i = 0; i < SIMPLE_MATRIX_OUTPUT_SIZE; i++)
#  143|->     output_int16[i] = 0;
#  144|     for (i = 0; i < simple_matrix->cols; i++)
#  145|     {

Error: CPPCHECK_WARNING (CWE-457): [#def86]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:236: warning[uninitvar]: Uninitialized variable: dec_error
#  234|     is_channels_valid = (order_plus_one >= 2 && order_plus_one <= 6) &&
#  235|       (nondiegetic_channels == 0 || nondiegetic_channels == 2);
#  236|->   is_projection_valid = (enc_error == OPUS_OK && dec_error == OPUS_OK);
#  237|     if (is_channels_valid ^ is_projection_valid)
#  238|     {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def87]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c: scope_hint: In function ‘generate_music’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:256:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘a’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  254|      c = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  255|      d = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  256|->    memset(a, 0, sizeof(opus_int32) * channels);
#  257|      memset(b, 0, sizeof(opus_int32) * channels);
#  258|      memset(c, 0, sizeof(opus_int32) * channels);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def88]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:257:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘b’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  255|      d = (opus_int32 *)malloc(sizeof(opus_int32) * channels);
#  256|      memset(a, 0, sizeof(opus_int32) * channels);
#  257|->    memset(b, 0, sizeof(opus_int32) * channels);
#  258|      memset(c, 0, sizeof(opus_int32) * channels);
#  259|      memset(d, 0, sizeof(opus_int32) * channels);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def89]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:258:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘c’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  256|      memset(a, 0, sizeof(opus_int32) * channels);
#  257|      memset(b, 0, sizeof(opus_int32) * channels);
#  258|->    memset(c, 0, sizeof(opus_int32) * channels);
#  259|      memset(d, 0, sizeof(opus_int32) * channels);
#  260|      j=0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def90]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:259:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘d’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  257|      memset(b, 0, sizeof(opus_int32) * channels);
#  258|      memset(c, 0, sizeof(opus_int32) * channels);
#  259|->    memset(d, 0, sizeof(opus_int32) * channels);
#  260|      j=0;
#  261|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def91]
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:273:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
opus-1.5.2-build/opus-1.5.2/celt/arch.h:38: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/celt/float_cast.h:33: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:36: included_from: Included from here.
opus-1.5.2-build/opus-1.5.2/include/opus_defines.h:181:75: note: in definition of macro ‘__opus_check_int’
opus-1.5.2-build/opus-1.5.2/tests/test_opus_projection.c:318:5: note: in expansion of macro ‘OPUS_SET_BITRATE’
#  271|         c[k]=(30*(c[k]+b[k]+d[k])+32)>>6;d[k]=b[k];
#  272|         v=(c[k]+128)>>8;
#  273|->       buf[i*channels+k]=v>32767?32767:(v<-32768?-32768:v);
#  274|         if(i%6==0)j++;
#  275|        }

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-23.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameopus-1.5.2-1.fc42
store-results-to/tmp/tmpiglbm2ib/opus-1.5.2-1.fc42.tar.xz
time-created2024-11-13 02:10:03
time-finished2024-11-13 02:13:44
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpiglbm2ib/opus-1.5.2-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpiglbm2ib/opus-1.5.2-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9