Task #91458 - added.err
back to task #91458download
Error: GCC_ANALYZER_WARNING (CWE-465):
libopusenc-0.3/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.3/src/opusenc.c:282:10: warning[-Wanalyzer-malloc-leak]: leak of 'packet_copy'
libopusenc-0.3/src/opusenc.c:762:5: enter_function: entry to 'ope_encoder_write'
libopusenc-0.3/src/opusenc.c:764:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:765:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:766:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:767:6: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:767:6: branch_false: following 'false' branch (when 'samples_per_channel >= 0')...
libopusenc-0.3/src/opusenc.c:768:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:783:8: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:785:20: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:786:16: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:789:77: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:801: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.3/src/opusenc.c:283:15: warning[-Wanalyzer-malloc-leak]: leak of 'packet_copy'
libopusenc-0.3/src/opusenc.c:762:5: enter_function: entry to 'ope_encoder_write'
libopusenc-0.3/src/opusenc.c:764:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:765:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:766:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:767:6: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:767:6: branch_false: following 'false' branch (when 'samples_per_channel >= 0')...
libopusenc-0.3/src/opusenc.c:768:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:783:8: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:785:20: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:786:16: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:789:77: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:801: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.3/src/opusenc.c:289:3: warning[-Wanalyzer-malloc-leak]: leak of 'packet_copy'
libopusenc-0.3/src/opusenc.c:762:5: enter_function: entry to 'ope_encoder_write'
libopusenc-0.3/src/opusenc.c:764:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:765:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:766:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:767:6: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:767:6: branch_false: following 'false' branch (when 'samples_per_channel >= 0')...
libopusenc-0.3/src/opusenc.c:768:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:783:8: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:785:20: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:786:16: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:789:77: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:801: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.3/src/opusenc.c:650:7: warning[-Wanalyzer-malloc-leak]: leak of 'packet_copy'
libopusenc-0.3/src/opusenc.c:762:5: enter_function: entry to 'ope_encoder_write'
libopusenc-0.3/src/opusenc.c:764:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:765:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:766:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:767:6: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:767:6: branch_false: following 'false' branch (when 'samples_per_channel >= 0')...
libopusenc-0.3/src/opusenc.c:768:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:783:8: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:785:20: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:786:16: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:789:77: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:801:5: call_function: calling 'encode_buffer' from 'ope_encoder_write'
# 648| memcpy(packet_copy, packet, nbBytes);
# 649| }
# 650|-> oggp_commit_packet(enc->oggp, nbBytes, granulepos, e_o_s);
# 651| if (e_o_s) ret = oe_flush_page(enc);
# 652| else if (!enc->pull_api) ret = output_pages(enc);
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.3/src/opusenc.c:663:17: warning[-Wanalyzer-malloc-leak]: leak of 'packet_copy'
libopusenc-0.3/src/opusenc.c:762:5: enter_function: entry to 'ope_encoder_write'
libopusenc-0.3/src/opusenc.c:764:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:765:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:766:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:767:6: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:767:6: branch_false: following 'false' branch (when 'samples_per_channel >= 0')...
libopusenc-0.3/src/opusenc.c:768:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:783:8: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:785:20: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:786:16: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:789:77: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:801:5: call_function: calling 'encode_buffer' from 'ope_encoder_write'
# 661| tmp = enc->streams->next;
# 662| if (enc->streams->close_at_end && !enc->pull_api) {
# 663|-> ret = enc->callbacks.close(enc->streams->user_data);
# 664| if (ret) {
# 665| enc->unrecoverable = OPE_CLOSE_FAIL;
Error: GCC_ANALYZER_WARNING (CWE-401):
libopusenc-0.3/src/opusenc.c:887:15: warning[-Wanalyzer-malloc-leak]: leak of 'obj'
libopusenc-0.3/src/opusenc.c:886:15: acquire_memory: allocated here
libopusenc-0.3/src/opusenc.c:886:6: branch_false: following 'false' branch (when 'obj' is non-NULL)...
libopusenc-0.3/src/opusenc.c:887:15: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:887:15: throw: if 'opeint_fopen' throws an exception...
libopusenc-0.3/src/opusenc.c:887:15: danger: 'obj' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 885| struct StdioObject *obj;
# 886| if (!(obj = malloc(sizeof(*obj)))) return OPE_ALLOC_FAIL;
# 887|-> obj->file = opeint_fopen(path, "wb");
# 888| if (!obj->file) {
# 889| free(obj);
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.3/src/opusenc.c:951:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libopusenc-0.3/src/opusenc.c:928:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:929:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:929:3: acquire_resource: 'va_start' called here
libopusenc-0.3/src/opusenc.c:951:13: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:951:13: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:951:13: throw: if 'opus_projection_encoder_ctl' throws an exception...
libopusenc-0.3/src/opusenc.c:951:13: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 949| {
# 950| opus_int32 value = va_arg(ap, opus_int32);
# 951|-> ret = opeint_encoder_ctl2(&enc->st, request, value);
# 952| }
# 953| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.3/src/opusenc.c:957:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libopusenc-0.3/src/opusenc.c:928:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:929:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:929:3: acquire_resource: 'va_start' called here
libopusenc-0.3/src/opusenc.c:957:13: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:957:13: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:957:13: throw: if 'opus_projection_encoder_ctl' throws an exception...
libopusenc-0.3/src/opusenc.c:957:13: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 955| {
# 956| opus_int32 *value = va_arg(ap, opus_int32*);
# 957|-> ret = opeint_encoder_ctl(&enc->st, OPUS_GET_LOOKAHEAD(value));
# 958| }
# 959| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.3/src/opusenc.c:971:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libopusenc-0.3/src/opusenc.c:928:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:929:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:929:3: acquire_resource: 'va_start' called here
libopusenc-0.3/src/opusenc.c:967:10: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:971:13: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:971:13: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:971:13: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:971:13: throw: if 'opus_projection_encoder_ctl' throws an exception...
libopusenc-0.3/src/opusenc.c:971:13: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 969| break;
# 970| }
# 971|-> ret = opeint_encoder_ctl(&enc->st, OPUS_SET_EXPERT_FRAME_DURATION(value));
# 972| if (ret == OPUS_OK) {
# 973| enc->frame_size = compute_frame_samples(value);
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.3/src/opusenc.c:997:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libopusenc-0.3/src/opusenc.c:928:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:929:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:929:3: acquire_resource: 'va_start' called here
libopusenc-0.3/src/opusenc.c:997:13: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:997:13: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:997:13: throw: if 'opus_projection_encoder_ctl' throws an exception...
libopusenc-0.3/src/opusenc.c:997:13: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
# 995| {
# 996| opus_int32 *value = va_arg(ap, opus_int32*);
# 997|-> ret = opeint_encoder_ctl2(&enc->st, request, value);
# 998| }
# 999| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.3/src/opusenc.c:1006:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libopusenc-0.3/src/opusenc.c:928:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:929:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:929:3: acquire_resource: 'va_start' called here
libopusenc-0.3/src/opusenc.c:1006:7: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:1006:7: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:1006:7: throw: if 'opus_projection_encoder_ctl' throws an exception...
libopusenc-0.3/src/opusenc.c:1006:7: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 1004| stream_id = va_arg(ap, opus_int32);
# 1005| value = va_arg(ap, OpusEncoder**);
# 1006|-> opeint_encoder_ctl(&enc->st, OPUS_MULTISTREAM_GET_ENCODER_STATE(stream_id, value));
# 1007| }
# 1008| break;
Error: GCC_ANALYZER_WARNING (CWE-404):
libopusenc-0.3/src/opusenc.c:1036:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libopusenc-0.3/src/opusenc.c:928:6: branch_false: following 'false' branch...
libopusenc-0.3/src/opusenc.c:929:3: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:929:3: acquire_resource: 'va_start' called here
libopusenc-0.3/src/opusenc.c:1031:10: branch_false: following 'false' branch (when 'value >= 0')...
libopusenc-0.3/src/opusenc.c:1035:7: branch_false: ...to here
libopusenc-0.3/src/opusenc.c:1036:10: branch_true: following 'true' branch...
libopusenc-0.3/src/opusenc.c:1036:22: branch_true: ...to here
libopusenc-0.3/src/opusenc.c:1036:22: throw: if 'oggp_set_muxing_delay' throws an exception...
libopusenc-0.3/src/opusenc.c:1036:22: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 1034| }
# 1035| enc->max_ogg_delay = value;
# 1036|-> if (enc->oggp) oggp_set_muxing_delay(enc->oggp, enc->max_ogg_delay);
# 1037| }
# 1038| break;