Task #951 - opus-1.5.1-1.fc41/scan-results.err
back to task #951download
Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c:38: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c: scope_hint: In function 'compute_twiddles' opus-1.5.1-build/opus-1.5.1/celt/_kiss_fft_guts.h:172:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'twiddles' opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c:421:7: note: in expansion of macro 'kf_cexp' opus-1.5.1-build/opus-1.5.1/celt/_kiss_fft_guts.h:36: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c:444:32: note: in expansion of macro 'KISS_FFT_MALLOC' opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c: scope_hint: In function 'compute_twiddles' opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c:473:57: note: in expansion of macro 'KISS_FFT_MALLOC' opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c:473:57: note: in expansion of macro 'KISS_FFT_MALLOC' opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c: scope_hint: In function 'compute_twiddles' opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:605:4: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 603| tmp[i*N0+j] = X[j*stride+i]; # 604| } # 605|-> OPUS_COPY(X, tmp, N); # 606| RESTORE_STACK; # 607| } Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:622:31: warning[core.NullDereference]: Array access (from variable 'X') results in a null pointer dereference # 620| for (i=0;i<stride;i++) # 621| for (j=0;j<N0;j++) # 622|-> tmp[j*stride+i] = X[ordery[i]*N0+j]; # 623| } else { # 624| for (i=0;i<stride;i++) Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:628:4: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 626| tmp[j*stride+i] = X[i*N0+j]; # 627| } # 628|-> OPUS_COPY(X, tmp, N); # 629| RESTORE_STACK; # 630| } Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:640:17: warning[core.NullDereference]: Array access (from variable 'X') results in a null pointer dereference # 638| { # 639| opus_val32 tmp1, tmp2; # 640|-> tmp1 = MULT16_16(QCONST16(.70710678f,15), X[stride*2*j+i]); # 641| tmp2 = MULT16_16(QCONST16(.70710678f,15), X[stride*(2*j+1)+i]); # 642| X[stride*2*j+i] = EXTRACT16(PSHR32(ADD32(tmp1, tmp2), 15)); Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:931:15: warning[core.NullDereference]: Array access (from variable 'x') results in a null pointer dereference # 929| } # 930| if (ctx->resynth) # 931|-> x[0] = sign ? -NORM_SCALING : NORM_SCALING; # 932| x = Y; # 933| } while (++c<1+stereo); Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:1074:16: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1072| if (!fill) # 1073| { # 1074|-> OPUS_CLEAR(X, N); # 1075| } else { # 1076| if (lowband == NULL) Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:1082:27: warning[core.NullDereference]: Array access (from variable 'X') results in a null pointer dereference # 1080| { # 1081| ctx->seed = celt_lcg_rand(ctx->seed); # 1082|-> X[j] = (celt_norm)((opus_int32)ctx->seed>>20); # 1083| } # 1084| cm = cm_mask; Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:1226:30: warning[core.NullDereference]: Array access (from variable 'X') results in a null pointer dereference # 1224| n = celt_sqrt(SHL32(EXTEND32(N0),22)); # 1225| for (j=0;j<N0;j++) # 1226|-> lowband_out[j] = MULT16_16_Q15(n,X[j]); # 1227| } # 1228| cm &= (1<<B)-1; Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/bands.c:1570:40: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 1568| if (resynth) # 1569| for (j=0;j<M*eBands[i]-norm_offset;j++) # 1570|-> norm[j] = HALF32(norm[j]+norm2[j]); # 1571| } # 1572| if (dual_stereo) Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-126): opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c: scope_hint: In function 'deemphasis' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:308:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c: scope_hint: In function 'deemphasis' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:40: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER' opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.h:34: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/mdct.h:46: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:38: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:139:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:141:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:142:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:143:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:144:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:147:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:150:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:152:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:154:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:156:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:158:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER' opus-1.5.1-build/opus-1.5.1/celt/mdct.h:107:39: note: in definition of macro 'clt_mdct_backward' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:298:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/cwrs.h:34: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/rate.h:43: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/bands.h:37: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:42: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:308:9: note: read of 8 bytes from after the end of 'out_syn' opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:372:52: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*scratch[<unknown>]' opus-1.5.1-build/opus-1.5.1/celt/arch.h:277:27: note: in definition of macro 'SCALEOUT' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:372:34: note: in expansion of macro 'SIG2WORD16' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c: scope_hint: In function 'deemphasis' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:139:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:141:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:142:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:143:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:144:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:147:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:150:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:152:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:154:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:156:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:158:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER' opus-1.5.1-build/opus-1.5.1/celt/mdct.h:107:39: note: in definition of macro 'clt_mdct_backward' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:298:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC' opus-1.5.1-build/opus-1.5.1/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC' opus-1.5.1-build/opus-1.5.1/celt/arch.h:277:27: note: in definition of macro 'SCALEOUT' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:372:34: note: in expansion of macro 'SIG2WORD16' opus-1.5.1-build/opus-1.5.1/celt/arch.h:277:27: note: in definition of macro 'SCALEOUT' opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1203:28: warning[core.VLASize]: Declared variable-length array (VLA) has negative size # 1201| intra_ener, dec, C, LM); # 1202| # 1203|-> ALLOC(tf_res, nbEBands, int); # 1204| tf_decode(start, end, isTransient, tf_res, LM, dec); # 1205| Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c: scope_hint: In function 'opus_custom_decode' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1437:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*out[j]' opus-1.5.1-build/opus-1.5.1/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c: scope_hint: In function 'opus_custom_decode' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:139:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:141:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:142:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:143:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:144:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:145:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:147:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:148:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:150:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:151:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:152:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:153:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:154:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:155:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:156:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:157:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/arch.h:83:34: note: in definition of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:158:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:159:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:1024:4: note: in expansion of macro 'VALIDATE_CELT_DECODER' opus-1.5.1-build/opus-1.5.1/celt/mdct.h:107:39: note: in definition of macro 'clt_mdct_backward' opus-1.5.1-build/opus-1.5.1/celt/celt_decoder.c:298:4: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC' opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/celt/celt_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-570): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/celt_encoder.c:1090:17: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>' is a garbage value # 1088| tmp = median_of_3(&bandLogE3[0])-offset; # 1089| f[0] = MAX16(f[0], tmp); # 1090|-> f[1] = MAX16(f[1], tmp); # 1091| tmp = median_of_3(&bandLogE3[end-3])-offset; # 1092| f[end-2] = MAX16(f[end-2], tmp); Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/celt_encoder.c:1737:22: warning[core.VLASize]: Declared variable-length array (VLA) has negative size # 1735| } # 1736| # 1737|-> ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */ # 1738| ALLOC(bandE,nbEBands*CC, celt_ener); # 1739| ALLOC(bandLogE,nbEBands*CC, opus_val16); Error: CPPCHECK_WARNING (CWE-570): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/celt/celt_lpc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/cwrs.c:460:33: warning[core.NullDereference]: Array access results in an undefined pointer dereference # 458| void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ # 459| celt_assert(_k>0); # 460|-> ec_enc_uint(_enc,icwrs(_n,_y),CELT_PVQ_V(_n,_k)); # 461| } # 462| Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/entenc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/celt/entenc.c:62:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’ opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_entropy.c: scope_hint: In function ‘ec_enc_carry_out.part.0’ opus-1.5.1-build/opus-1.5.1/celt/ecintrin.h:32: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/entcode.h:35: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_entropy.c:38: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c:327:4: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 325| ) # 326| { # 327|-> const int p=*factors++; /* the radix */ # 328| const int m=*factors++; /* stage's fft length/p */ # 329| Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/kiss_fft.c:512:7: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 510| { # 511| opus_fft_free_arch((kiss_fft_state *)cfg, arch); # 512|-> opus_free((opus_int16*)cfg->bitrev); # 513| if (cfg->shift < 0) # 514| opus_free((kiss_twiddle_cpx*)cfg->twiddles); Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/laplace.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/mdct.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/mdct.c:82:60: warning[core.BitwiseShift]: Right operand is negative in right shift # 80| #endif # 81| } # 82|-> l->trig = trig = (kiss_twiddle_scalar*)opus_alloc((N-(N2>>maxshift))*sizeof(kiss_twiddle_scalar)); # 83| if (l->trig==NULL) # 84| return 0; Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/modes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/celt/modes.c: scope_hint: In function 'compute_ebands' opus-1.5.1-build/opus-1.5.1/celt/modes.c:101:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'malloc(44)' opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/modes.c:126:34: warning[core.UndefinedBinaryOperatorResult]: The right operand of '-' is a garbage value due to array index out of bounds # 124| eBands[i] = i; # 125| if (low>0) # 126|-> offset = eBands[low-1]*res - bark_freq[lin-1]; # 127| /* Spacing follows critical bands */ # 128| for (i=0;i<high;i++) Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/modes.c:205:80: warning[core.UndefinedBinaryOperatorResult]: The right operand of '*' is a garbage value due to array index out of bounds # 203| else { # 204| opus_int32 a0, a1; # 205|-> a1 = mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize - 400*(opus_int32)eband5ms[k-1]; # 206| a0 = 400*(opus_int32)eband5ms[k] - mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize; # 207| allocVectors[i*mode->nbEBands+j] = (a0*band_allocation[i*maxBands+k-1] Error: GCC_ANALYZER_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/celt/modes.c: scope_hint: In function 'opus_custom_mode_destroy' opus-1.5.1-build/opus-1.5.1/celt/modes.c:433:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*mode.allocVectors' opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/opus_custom_demo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-688): opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c:38: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c: scope_hint: In function 'surround_analysis' opus-1.5.1-build/opus-1.5.1/celt/os_support.h:79:33: warning[-Wanalyzer-null-argument]: use of NULL 'mem' where non-null expected opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c:267:7: note: in expansion of macro 'OPUS_COPY' opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c:35: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/stack_alloc.h:94:41: note: in definition of macro 'ALLOC' opus-1.5.1-build/opus-1.5.1/src/opus_private.h:32: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c:34: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c:266:7: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c:267:7: note: in expansion of macro 'OPUS_COPY' opus-1.5.1-build/opus-1.5.1/celt/os_support.h:79:48: note: in definition of macro 'OPUS_COPY' opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/celt/mathops.h:39: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/src/analysis.c:38: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/src/analysis.c: scope_hint: In function 'tonality_analysis' opus-1.5.1-build/opus-1.5.1/celt/os_support.h:79:33: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to 'memcpy' opus-1.5.1-build/opus-1.5.1/src/analysis.c:556:8: note: in expansion of macro 'OPUS_COPY' opus-1.5.1-build/opus-1.5.1/src/analysis.c:556:8: note: in expansion of macro 'OPUS_COPY' opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/celt/entenc.c:31: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_laplace.c:38: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/entenc.c: scope_hint: In function ‘ec_enc_done’ opus-1.5.1-build/opus-1.5.1/celt/os_support.h:90:29: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ptr’ where non-null expected opus-1.5.1-build/opus-1.5.1/celt/entenc.c:288:5: note: in expansion of macro ‘OPUS_CLEAR’ opus-1.5.1-build/opus-1.5.1/celt/os_support.h:90:47: note: in definition of macro ‘OPUS_CLEAR’ opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/celt/pitch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/pitch.c:510:33: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value due to array index out of bounds # 508| dual_inner_prod(x, &x[-T1], &x[-T1b], N, &xy, &xy2, arch); # 509| xy = HALF32(xy + xy2); # 510|-> yy = HALF32(yy_lookup[T1] + yy_lookup[T1b]); # 511| g1 = compute_pitch_gain(xy, xx, yy); # 512| if (abs(T1-prev_period)<=1) Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/quant_bands.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/quant_bands.c:483:69: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value due to array index out of bounds # 481| # 482| oldEBands[i+c*m->nbEBands] = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); # 483|-> tmp = PSHR32(MULT16_16(coef,oldEBands[i+c*m->nbEBands]),8) + prev[c] + SHL32(q,7); # 484| #ifdef FIXED_POINT # 485| tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/rate.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/celt/rate.c: scope_hint: In function 'compute_pulse_cache' opus-1.5.1-build/opus-1.5.1/celt/rate.c:97:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*m.cache.index' opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/rate.c:183:30: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value # 181| /* Compute the cost for the lowest-level PVQ of a fully split # 182| band. */ # 183|-> pcache = bits + cindex[(LM0+1)*m->nbEBands+j]; # 184| max_bits = pcache[pcache[0]]+1; # 185| /* Add in the cost of coding regular splits. */ Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_cwrs32.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_dft.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_dft.c: scope_hint: In function ‘test1d’ opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_entropy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_laplace.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_mathops.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_mdct.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_mdct.c: scope_hint: In function 'test1d.isra' opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_mdct.c: scope_hint: In function ‘test1d’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_mdct.c:163:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out’ opus-1.5.1-build/opus-1.5.1/celt/tests/test_unit_mdct.c:34: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/vq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/celt/vq.c:288:16: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value due to array index out of bounds # 286| Rxy = EXTRACT16(SHR32(ADD32(xy, EXTEND32(X[j])),rshift)); # 287| /* We're multiplying y[j] by two so we don't have to do it here */ # 288|-> Ryy = ADD16(yy, y[j]); # 289| # 290| /* Approximate score: we maximise Rxy/sqrt(Ryy) (we're guaranteed that Error: COMPILER_WARNING: opus-1.5.1-build/opus-1.5.1/celt/x86/pitch_avx.c: scope_hint: In function 'xcorr_kernel_avx' opus-1.5.1-build/opus-1.5.1/celt/x86/pitch_avx.c:42:67: 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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/celt/x86/vq_sse2.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/doc/trivial_example.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-775): opus-1.5.1-build/opus-1.5.1/doc/trivial_example.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/silk/A2NLSF.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/CNG.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/silk/LPC_inv_pred_gain.c:32: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/silk/SigProc_FIX.h:622: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/silk/Inlines.h:159:15: warning[core.DivideZero]: Division by zero # 157| # 158| /* Inverse of b32, with 14 bits of precision */ # 159|-> b32_inv = silk_DIV32_16( silk_int32_MAX >> 2, silk_RSHIFT(b32_nrm, 16) ); /* Q: 29 + 16 - b_headrm */ # 160| # 161| /* First approximation */ Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/LPC_fit.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/LPC_inv_pred_gain.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/LP_variable_cutoff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/silk/NLSF_del_dec_quant.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/NLSF_stabilize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/NSQ.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/NSQ_del_dec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/PLC.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/VAD.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/check_control_input.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/control_audio_bandwidth.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/control_codec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/dec_API.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/silk/dec_API.c: scope_hint: In function 'silk_Decode.isra' opus-1.5.1-build/opus-1.5.1/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.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/silk/main.h:31: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/silk/dec_API.c:32: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/silk/dec_API.c: scope_hint: In function 'silk_Decode' opus-1.5.1-build/opus-1.5.1/silk/dec_API.c:380:64: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'nSamplesOutDec' opus-1.5.1-build/opus-1.5.1/silk/SigProc_FIX.h:420:61: note: in definition of macro 'silk_memcpy' opus-1.5.1-build/opus-1.5.1/celt/ecintrin.h:32: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/entcode.h:35: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/entenc.h:31: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/silk/API.h:34: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/silk/dec_API.c:31: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/silk/dec_API.c:161:5: note: in expansion of macro 'celt_assert' opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/silk/decode_core.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/decode_indices.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/decode_pulses.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/decoder_set_fs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/enc_API.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/encode_indices.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/encode_pulses.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/silk/encode_pulses.c:49:34: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 47| # 48| for( k = 0; k < len; k++ ) { # 49|-> sum = pulses_in[ 2 * k ] + pulses_in[ 2 * k + 1 ]; # 50| if( sum > max_pulses ) { # 51| return 1; Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/silk/encode_pulses.c:125:43: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>>' is a garbage value # 123| nRshifts[ i ]++; # 124| for( k = 0; k < SHELL_CODEC_FRAME_LENGTH; k++ ) { # 125|-> abs_pulses_ptr[ k ] = silk_RSHIFT( abs_pulses_ptr[ k ], 1 ); # 126| } # 127| } else { Error: GCC_ANALYZER_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/silk/encode_pulses.c: scope_hint: In function 'silk_encode_pulses' opus-1.5.1-build/opus-1.5.1/silk/encode_pulses.c:144:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*nRshifts[i]' opus-1.5.1-build/opus-1.5.1/silk/encode_pulses.c:33: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/stack_alloc.h:94:37: note: in definition of macro 'ALLOC' opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/burg_modified_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/encode_frame_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/silk/float/encode_frame_FLP.c: scope_hint: In function 'silk_encode_frame_FLP' opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/silk/float/encode_frame_FLP.c: scope_hint: In function 'silk_LBRR_encode_FLP' opus-1.5.1-build/opus-1.5.1/silk/float/encode_frame_FLP.c:420:46: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read opus-1.5.1-build/opus-1.5.1/silk/float/encode_frame_FLP.c:420:46: note: read of 4 bytes from after the end of 'Gains_Q16' opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/silk/float/noise_shape_analysis_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/pitch_analysis_core_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/process_gains_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/silk/float/process_gains_FLP.c: scope_hint: In function 'silk_process_gains_FLP' opus-1.5.1-build/opus-1.5.1/silk/float/process_gains_FLP.c:80:43: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read opus-1.5.1-build/opus-1.5.1/silk/float/process_gains_FLP.c:80:43: note: read of 4 bytes from after the end of 'pGains_Q16' opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/silk/float/residual_energy_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/sort_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/wrappers_FLP.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/x86/inner_product_FLP_avx2.c:49:5: warning[deadcode.DeadStores]: Value stored to 'result' is never read # 47| # 48| /* 4x unrolled loop */ # 49|-> result = 0.0; # 50| accum1 = accum2 = _mm256_setzero_pd(); # 51| for( i = 0; i < dataSize - 7; i += 8 ) { Error: COMPILER_WARNING: opus-1.5.1-build/opus-1.5.1/silk/float/x86/inner_product_FLP_avx2.c: scope_hint: In function 'silk_inner_product_FLP_avx2' opus-1.5.1-build/opus-1.5.1/silk/float/x86/inner_product_FLP_avx2.c:50:21: 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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/quant_LTP_gains.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/resampler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/sort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/stereo_LR_to_MS.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-786): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/silk/stereo_LR_to_MS.c:77:34: warning[core.VLASize]: Declared variable-length array (VLA) has negative size # 75| # 76| /* LP and HP filter mid signal */ # 77|-> ALLOC( LP_mid, frame_length, opus_int16 ); # 78| ALLOC( HP_mid, frame_length, opus_int16 ); # 79| for( n = 0; n < frame_length; n++ ) { Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/silk/stereo_LR_to_MS.c:77:34: warning[core.VLASize]: Declared variable-length array (VLA) has zero size # 75| # 76| /* LP and HP filter mid signal */ # 77|-> ALLOC( LP_mid, frame_length, opus_int16 ); # 78| ALLOC( HP_mid, frame_length, opus_int16 ); # 79| for( n = 0; n < frame_length; n++ ) { Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/tests/test_unit_LPC_inv_pred_gain.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/x86/NSQ_del_dec_avx2.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING: opus-1.5.1-build/opus-1.5.1/silk/x86/NSQ_del_dec_avx2.c: scope_hint: In function 'silk_mm256_sub_sat_epi32' opus-1.5.1-build/opus-1.5.1/silk/x86/NSQ_del_dec_avx2.c:155:1: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI opus-1.5.1-build/opus-1.5.1/silk/x86/NSQ_del_dec_avx2.c: scope_hint: In function 'silk_mm256_reverse_epi32' opus-1.5.1-build/opus-1.5.1/silk/x86/NSQ_del_dec_avx2.c:208:28: note: the ABI for passing parameters with 32-byte alignment has changed in GCC 4.6 # 153| } # 154| static OPUS_INLINE __m256i silk_mm256_sub_sat_epi32(__m256i a, __m256i b) # 155|-> { # 156| __m256i r = _mm256_sub_epi32(a, b); # 157| __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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/x86/NSQ_del_dec_sse4_1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/silk/x86/NSQ_sse4_1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-786): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/silk/x86/VAD_sse4_1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/analysis.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/src/extensions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/mlp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_compare.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/src/opus_compare.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/src/opus_compare.c:233:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ opus-1.5.1-build/opus-1.5.1/src/opus_compare.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_compare.c:239:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'x' # 237| fclose(fin2); # 238| if(xlength!=ylength*downsample){ # 239|-> fprintf(stderr,"Sample counts do not match (%lu!=%lu).\n", # 240| (unsigned long)xlength,(unsigned long)ylength*downsample); # 241| return EXIT_FAILURE; Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_compare.c:239:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'y' # 237| fclose(fin2); # 238| if(xlength!=ylength*downsample){ # 239|-> fprintf(stderr,"Sample counts do not match (%lu!=%lu).\n", # 240| (unsigned long)xlength,(unsigned long)ylength*downsample); # 241| return EXIT_FAILURE; Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_decoder.c:146:24: warning[unix.Malloc]: Use of memory allocated with size zero # 144| # 145| silkDecSizeBytes = align(silkDecSizeBytes); # 146|-> st->silk_dec_offset = align(sizeof(OpusDecoder)); # 147| st->celt_dec_offset = st->silk_dec_offset+silkDecSizeBytes; # 148| silk_dec = (char*)st+st->silk_dec_offset; Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_demo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_demo.c:778:30: warning[unix.MallocSizeof]: Result of 'malloc' is converted to a pointer of type 'unsigned char', which is incompatible with sizeof operand type 'short' # 776| out = (short*)malloc(max_frame_size*channels*sizeof(short)); # 777| /* We need to allocate for 16-bit PCM data, but we store it as unsigned char. */ # 778|-> fbytes = (unsigned char*)malloc(max_frame_size*channels*sizeof(short)); # 779| data = (unsigned char*)calloc(max_payload_bytes,sizeof(unsigned char)); # 780| if(delayed_decision) Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/src/opus_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/src/opus_demo.c:890:42: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fbytes’ opus-1.5.1-build/opus-1.5.1/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/src/opus_demo.c:892:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘in’ opus-1.5.1-build/opus-1.5.1/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/src/opus_demo.c:910:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ opus-1.5.1-build/opus-1.5.1/src/opus_demo.c:556:13: note: in expansion of macro ‘check_encoder_option’ opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/src/opus_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_encoder.c:220:25: warning[unix.Malloc]: Use of memory allocated with size zero # 218| return OPUS_BAD_ARG; # 219| silkEncSizeBytes = align(silkEncSizeBytes); # 220|-> st->silk_enc_offset = align(sizeof(OpusEncoder)); # 221| st->celt_enc_offset = st->silk_enc_offset+silkEncSizeBytes; # 222| silk_enc = (char*)st+st->silk_enc_offset; Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/src/opus_multistream_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/opus_multistream_encoder.c:898:29: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 896| else # 897| ptr += align(mono_size); # 898|-> opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrates[s])); # 899| if (st->mapping_type == MAPPING_TYPE_SURROUND) # 900| { Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/src/opus_projection_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/repacketizer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-775): opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c:54:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "w")’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c:54:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "w")’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/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-775): opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c:105:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ # 103| return EXIT_FAILURE; # 104| } # 105|-> fout = fopen(argv[argc-1], "w"); # 106| if(fout==NULL) # 107| { Error: GCC_ANALYZER_WARNING (CWE-401): opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c:105:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c: scope_hint: In function ‘main’ # 103| return EXIT_FAILURE; # 104| } # 105|-> fout = fopen(argv[argc-1], "w"); # 106| if(fout==NULL) # 107| { Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c:198:13: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/src/repacketizer_demo.c:224:19: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 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: opus-1.5.1-build/opus-1.5.1/tests/test_opus_api.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-688): opus-1.5.1-build/opus-1.5.1/tests/test_opus_api.c: scope_hint: In function ‘test_dec_api’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_decode.c:46: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/tests/test_opus_common.h: scope_hint: In function ‘debruijn2’ opus-1.5.1-build/opus-1.5.1/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: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_decode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/tests/test_opus_decode.c: scope_hint: In function ‘test_decoder_code0’ opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/tests/test_opus_dred.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/tests/test_opus_encode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): opus-1.5.1-build/opus-1.5.1/tests/test_opus_encode.c: scope_hint: In function ‘generate_music’ opus-1.5.1-build/opus-1.5.1/tests/test_opus_encode.c:66:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ opus-1.5.1-build/opus-1.5.1/tests/test_opus_encode.c:238:27: note: in expansion of macro ‘RAND_SAMPLE’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_encode.c: scope_hint: In function ‘run_test1’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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: opus-1.5.1-build/opus-1.5.1/tests/test_opus_extensions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_extensions.c:228:4: warning[deadcode.DeadStores]: Value stored to 'result' is never read # 226| result = opus_packet_extensions_count(packet, len); # 227| expect_true(result == 4, "expected opus_packet_extensions_count 4"); # 228|-> result = opus_packet_extensions_parse(packet, len, ext_out, &nb_ext); # 229| expect_true(nb_ext == 4, "expected 4 extensions"); # 230| Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_extensions.c:373:4: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 371| # 372| /* concatenate 3 frames */ # 373|-> res = opus_repacketizer_cat(&rp, packet, 4+len); # 374| /* for the middle frame, no padding, no extensions */ # 375| packet[1] = 1; Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_extensions.c:376:4: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 374| /* for the middle frame, no padding, no extensions */ # 375| packet[1] = 1; # 376|-> res = opus_repacketizer_cat(&rp, packet, 4); # 377| /* switch back to extensions for the last frame extensions */ # 378| packet[1] = 1 << 6 | 1; Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_extensions.c:379:4: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 377| /* switch back to extensions for the last frame extensions */ # 378| packet[1] = 1 << 6 | 1; # 379|-> res = opus_repacketizer_cat(&rp, packet, 4+len); # 380| # 381| expect_true(rp.nb_frames == 3, "Expected 3 frames"); Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_extensions.c:393:4: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 391| # 392| /* now verify that we have the expected extensions */ # 393|-> res = opus_packet_parse_impl(packet_out, res, 0, NULL, NULL, size, # 394| NULL, NULL, &padding, &padding_len); # 395| nb_ext = 10; Error: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_extensions.c:396:4: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 394| NULL, NULL, &padding, &padding_len); # 395| nb_ext = 10; # 396|-> res = opus_packet_extensions_parse(padding, padding_len, ext_out, &nb_ext); # 397| expect_true(nb_ext == 4, "Expected 4 extensions"); # 398| for (i = 0 ; i < nb_ext; i++) Error: CPPCHECK_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:110:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(120)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:110:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(160)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c: scope_hint: In function ‘test_simple_matrix’ opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:110:6: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(80)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:113:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(120)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:113:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(160)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:113:36: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(80)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:124:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(120)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:130:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(160)’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:143:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(80)’ opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:220:5: warning[deadcode.DeadStores]: Value stored to 'ret' is never read # 218| # 219| matrix = (unsigned char *)opus_alloc(matrix_size); # 220|-> ret = opus_projection_encoder_ctl(st_enc, # 221| OPUS_PROJECTION_GET_DEMIXING_MATRIX_REQUEST, matrix, matrix_size); # 222| Error: CPPCHECK_WARNING (CWE-457): opus-1.5.1-build/opus-1.5.1/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: CLANG_WARNING: opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:236:60: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c: scope_hint: In function ‘generate_music’ opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/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): opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:273:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ opus-1.5.1-build/opus-1.5.1/celt/arch.h:38: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/celt/float_cast.h:33: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/tests/test_opus_projection.c:36: included_from: Included from here. opus-1.5.1-build/opus-1.5.1/include/opus_defines.h:181:75: note: in definition of macro ‘__opus_check_int’ opus-1.5.1-build/opus-1.5.1/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| }