Task #91458 - fixed.err
back to task #91458download
Error: GCC_ANALYZER_WARNING (CWE-465):
libopusenc-0.2.1/src/opus_header.c:280:6: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it
# 278|
# 279| p=(char*)realloc(p, len);
# 280|-> if (p == NULL) return 1;
# 281|
# 282| writeint(p, *length, tag_len+val_len); /* length of comment */
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.2.1/src/opusenc.c:282:10: warning[-Wanalyzer-malloc-leak]: leak of ‘packet_copy’
libopusenc-0.2.1/src/opusenc.c:748:5: enter_function: entry to ‘ope_encoder_write’
libopusenc-0.2.1/src/opusenc.c:750:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:751:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:752:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: following ‘false’ branch (when ‘samples_per_channel >= 0’)...
libopusenc-0.2.1/src/opusenc.c:754:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:769:8: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:771:20: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:772:16: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:775:77: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:787:5: call_function: calling ‘encode_buffer’ from ‘ope_encoder_write’
# 280| unsigned char *page;
# 281| int len;
# 282|-> while (oggp_get_next_page(enc->oggp, &page, &len)) {
# 283| int ret = enc->callbacks.write(enc->streams->user_data, page, len);
# 284| if (ret) return ret;
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.2.1/src/opusenc.c:283:15: warning[-Wanalyzer-malloc-leak]: leak of ‘packet_copy’
libopusenc-0.2.1/src/opusenc.c:748:5: enter_function: entry to ‘ope_encoder_write’
libopusenc-0.2.1/src/opusenc.c:750:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:751:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:752:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: following ‘false’ branch (when ‘samples_per_channel >= 0’)...
libopusenc-0.2.1/src/opusenc.c:754:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:769:8: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:771:20: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:772:16: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:775:77: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:787:5: call_function: calling ‘encode_buffer’ from ‘ope_encoder_write’
# 281| int len;
# 282| while (oggp_get_next_page(enc->oggp, &page, &len)) {
# 283|-> int ret = enc->callbacks.write(enc->streams->user_data, page, len);
# 284| if (ret) return ret;
# 285| }
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.2.1/src/opusenc.c:289:3: warning[-Wanalyzer-malloc-leak]: leak of ‘packet_copy’
libopusenc-0.2.1/src/opusenc.c:748:5: enter_function: entry to ‘ope_encoder_write’
libopusenc-0.2.1/src/opusenc.c:750:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:751:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:752:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: following ‘false’ branch (when ‘samples_per_channel >= 0’)...
libopusenc-0.2.1/src/opusenc.c:754:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:769:8: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:771:20: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:772:16: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:775:77: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:787:5: call_function: calling ‘encode_buffer’ from ‘ope_encoder_write’
# 287| }
# 288| static int oe_flush_page(OggOpusEnc *enc) {
# 289|-> oggp_flush_page(enc->oggp);
# 290| if (!enc->pull_api) return output_pages(enc);
# 291| return 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.2.1/src/opusenc.c:636:7: warning[-Wanalyzer-malloc-leak]: leak of ‘packet_copy’
libopusenc-0.2.1/src/opusenc.c:748:5: enter_function: entry to ‘ope_encoder_write’
libopusenc-0.2.1/src/opusenc.c:750:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:751:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:752:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: following ‘false’ branch (when ‘samples_per_channel >= 0’)...
libopusenc-0.2.1/src/opusenc.c:754:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:769:8: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:771:20: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:772:16: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:775:77: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:787:5: call_function: calling ‘encode_buffer’ from ‘ope_encoder_write’
# 634| memcpy(packet_copy, packet, nbBytes);
# 635| }
# 636|-> oggp_commit_packet(enc->oggp, nbBytes, granulepos, e_o_s);
# 637| if (e_o_s) ret = oe_flush_page(enc);
# 638| else if (!enc->pull_api) ret = output_pages(enc);
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.2.1/src/opusenc.c:649:17: warning[-Wanalyzer-malloc-leak]: leak of ‘packet_copy’
libopusenc-0.2.1/src/opusenc.c:748:5: enter_function: entry to ‘ope_encoder_write’
libopusenc-0.2.1/src/opusenc.c:750:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:751:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:752:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:753:6: branch_false: following ‘false’ branch (when ‘samples_per_channel >= 0’)...
libopusenc-0.2.1/src/opusenc.c:754:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:769:8: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:771:20: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:772:16: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:775:77: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:787:5: call_function: calling ‘encode_buffer’ from ‘ope_encoder_write’
# 647| tmp = enc->streams->next;
# 648| if (enc->streams->close_at_end && !enc->pull_api) {
# 649|-> ret = enc->callbacks.close(enc->streams->user_data);
# 650| if (ret) {
# 651| enc->unrecoverable = OPE_CLOSE_FAIL;
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.2.1/src/opusenc.c:873:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’
libopusenc-0.2.1/src/opusenc.c:872:15: acquire_memory: allocated here
libopusenc-0.2.1/src/opusenc.c:872:6: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)...
libopusenc-0.2.1/src/opusenc.c:873:15: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:873:15: throw: if ‘opeint_fopen’ throws an exception...
libopusenc-0.2.1/src/opusenc.c:873:15: danger: ‘obj’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 871| struct StdioObject *obj;
# 872| if (!(obj = malloc(sizeof(*obj)))) return OPE_ALLOC_FAIL;
# 873|-> obj->file = opeint_fopen(path, "wb");
# 874| if (!obj->file) {
# 875| free(obj);
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.2.1/src/opusenc.c:937:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libopusenc-0.2.1/src/opusenc.c:914:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:915:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:915:3: acquire_resource: ‘va_start’ called here
libopusenc-0.2.1/src/opusenc.c:937:13: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:937:13: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:937:13: throw: if ‘opus_projection_encoder_ctl’ throws an exception...
libopusenc-0.2.1/src/opusenc.c:937:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 935| {
# 936| opus_int32 value = va_arg(ap, opus_int32);
# 937|-> ret = opeint_encoder_ctl2(&enc->st, request, value);
# 938| }
# 939| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.2.1/src/opusenc.c:943:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libopusenc-0.2.1/src/opusenc.c:914:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:915:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:915:3: acquire_resource: ‘va_start’ called here
libopusenc-0.2.1/src/opusenc.c:943:13: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:943:13: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:943:13: throw: if ‘opus_projection_encoder_ctl’ throws an exception...
libopusenc-0.2.1/src/opusenc.c:943:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 941| {
# 942| opus_int32 *value = va_arg(ap, opus_int32*);
# 943|-> ret = opeint_encoder_ctl(&enc->st, OPUS_GET_LOOKAHEAD(value));
# 944| }
# 945| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.2.1/src/opusenc.c:957:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libopusenc-0.2.1/src/opusenc.c:914:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:915:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:915:3: acquire_resource: ‘va_start’ called here
libopusenc-0.2.1/src/opusenc.c:953:10: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:957:13: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:957:13: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:957:13: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:957:13: throw: if ‘opus_projection_encoder_ctl’ throws an exception...
libopusenc-0.2.1/src/opusenc.c:957:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 955| break;
# 956| }
# 957|-> ret = opeint_encoder_ctl(&enc->st, OPUS_SET_EXPERT_FRAME_DURATION(value));
# 958| if (ret == OPUS_OK) {
# 959| enc->frame_size = compute_frame_samples(value);
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.2.1/src/opusenc.c:983:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libopusenc-0.2.1/src/opusenc.c:914:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:915:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:915:3: acquire_resource: ‘va_start’ called here
libopusenc-0.2.1/src/opusenc.c:983:13: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:983:13: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:983:13: throw: if ‘opus_projection_encoder_ctl’ throws an exception...
libopusenc-0.2.1/src/opusenc.c:983:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
# 981| {
# 982| opus_int32 *value = va_arg(ap, opus_int32*);
# 983|-> ret = opeint_encoder_ctl2(&enc->st, request, value);
# 984| }
# 985| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.2.1/src/opusenc.c:992:7: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libopusenc-0.2.1/src/opusenc.c:914:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:915:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:915:3: acquire_resource: ‘va_start’ called here
libopusenc-0.2.1/src/opusenc.c:992:7: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:992:7: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:992:7: throw: if ‘opus_projection_encoder_ctl’ throws an exception...
libopusenc-0.2.1/src/opusenc.c:992:7: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 990| stream_id = va_arg(ap, opus_int32);
# 991| value = va_arg(ap, OpusEncoder**);
# 992|-> opeint_encoder_ctl(&enc->st, OPUS_MULTISTREAM_GET_ENCODER_STATE(stream_id, value));
# 993| }
# 994| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.2.1/src/opusenc.c:1022:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libopusenc-0.2.1/src/opusenc.c:914:6: branch_false: following ‘false’ branch...
libopusenc-0.2.1/src/opusenc.c:915:3: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:915:3: acquire_resource: ‘va_start’ called here
libopusenc-0.2.1/src/opusenc.c:1017:10: branch_false: following ‘false’ branch (when ‘value >= 0’)...
libopusenc-0.2.1/src/opusenc.c:1021:7: branch_false: ...to here
libopusenc-0.2.1/src/opusenc.c:1022:10: branch_true: following ‘true’ branch...
libopusenc-0.2.1/src/opusenc.c:1022:22: branch_true: ...to here
libopusenc-0.2.1/src/opusenc.c:1022:22: throw: if ‘oggp_set_muxing_delay’ throws an exception...
libopusenc-0.2.1/src/opusenc.c:1022:22: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 1020| }
# 1021| enc->max_ogg_delay = value;
# 1022|-> if (enc->oggp) oggp_set_muxing_delay(enc->oggp, enc->max_ogg_delay);
# 1023| }
# 1024| break;