The following issues were found
libavdevice/xcbgrab.c
1 issues
Line: 741
Column: 38
CWE codes:
126
xcb_create_gc(conn, gc, root_window, mask, values);
cursor_font = xcb_generate_id(conn);
xcb_open_font(conn, cursor_font, strlen("cursor"), "cursor");
cursor = xcb_generate_id(conn);
xcb_create_glyph_cursor(conn, cursor, cursor_font, cursor_font,
CROSSHAIR_CURSOR, CROSSHAIR_CURSOR + 1, 0, 0, 0,
0xFFFF, 0xFFFF, 0xFFFF);
cookie = xcb_grab_pointer(conn, 0, root_window,
Reported by FlawFinder.
libavfilter/aeval.c
1 issues
Line: 225
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
static int config_props(AVFilterLink *outlink)
{
EvalContext *eval = outlink->src->priv;
char buf[128];
outlink->time_base = (AVRational){1, eval->sample_rate};
outlink->sample_rate = eval->sample_rate;
eval->var_values[VAR_S] = eval->sample_rate;
Reported by FlawFinder.
libavfilter/af_acrossover.c
1 issues
Line: 117
Column: 9
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
p = s->gains_str;
for (i = 0; i < MAX_BANDS; i++) {
float gain;
char c[3] = { 0 };
if (!(arg = av_strtok(p, " |", &saveptr)))
break;
p = NULL;
Reported by FlawFinder.
libavfilter/af_adeclick.c
1 issues
Line: 537
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
}
} else {
memcpy(dst, src, s->window_size * sizeof(*dst));
}
if (s->method == 0) {
for (j = 0; j < s->window_size; j++)
buf[j] += dst[j] * w[j];
Reported by FlawFinder.
libavfilter/af_amix.c
1 issues
Line: 249
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
AVFilterContext *ctx = outlink->src;
MixContext *s = ctx->priv;
int i;
char buf[64];
s->planar = av_sample_fmt_is_planar(outlink->format);
s->sample_rate = outlink->sample_rate;
outlink->time_base = (AVRational){ 1, outlink->sample_rate };
s->next_pts = AV_NOPTS_VALUE;
Reported by FlawFinder.
libavfilter/af_anequalizer.c
1 issues
Line: 559
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
filters = av_calloc(s->nb_allocated, 2 * sizeof(*s->filters));
if (!filters)
return AVERROR(ENOMEM);
memcpy(filters, s->filters, sizeof(*s->filters) * s->nb_allocated);
av_free(s->filters);
s->filters = filters;
s->nb_allocated *= 2;
}
s->nb_filters++;
Reported by FlawFinder.
libavfilter/af_aresample.c
1 issues
Line: 145
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
AResampleContext *aresample = ctx->priv;
int64_t out_rate, out_layout;
enum AVSampleFormat out_format;
char inchl_buf[128], outchl_buf[128];
aresample->swr = swr_alloc_set_opts(aresample->swr,
outlink->channel_layout, outlink->format, outlink->sample_rate,
inlink->channel_layout, inlink->format, inlink->sample_rate,
0, ctx);
Reported by FlawFinder.
libavfilter/af_ashowinfo.c
1 issues
Line: 181
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
{
AVFilterContext *ctx = inlink->dst;
AShowInfoContext *s = ctx->priv;
char chlayout_str[128];
uint32_t checksum = 0;
int channels = inlink->channels;
int planar = av_sample_fmt_is_planar(buf->format);
int block_align = av_get_bytes_per_sample(buf->format) * (planar ? 1 : channels);
int data_size = buf->nb_samples * block_align;
Reported by FlawFinder.
libavfilter/af_astats.c
1 issues
Line: 386
Column: 5
CWE codes:
134
Suggestion:
Use a constant for the format specification
uint8_t value[128];
uint8_t key2[128];
snprintf(value, sizeof(value), fmt, val);
if (chan)
snprintf(key2, sizeof(key2), "lavfi.astats.%d.%s", chan, key);
else
snprintf(key2, sizeof(key2), "lavfi.astats.%s", key);
av_dict_set(metadata, key2, value, 0);
Reported by FlawFinder.
libavfilter/af_biquads.c
1 issues
Line: 762
Column: 17
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
for (ch = start; ch < end; ch++) {
if (!((av_channel_layout_extract_channel(inlink->channel_layout, ch) & s->channels))) {
if (buf != out_buf)
memcpy(out_buf->extended_data[ch], buf->extended_data[ch],
buf->nb_samples * s->block_align);
continue;
}
s->filter(s, buf->extended_data[ch], out_buf->extended_data[ch], buf->nb_samples,
Reported by FlawFinder.