The following issues were found
libavfilter/vf_estdif.c
1 issues
Line: 367
Column: 13
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
out_line = dst_data + (y_out * dst_linesize);
while (y_out < end) {
memcpy(out_line, in_line, linesize);
y_out += 2;
in_line += src_linesize * 2;
out_line += dst_linesize * 2;
}
Reported by FlawFinder.
libavfilter/vf_fftfilt.c
1 issues
Line: 64
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
FFTSample *rdft_vdata[MAX_PLANES];
int dc[MAX_PLANES];
char *weight_str[MAX_PLANES];
AVExpr *weight_expr[MAX_PLANES];
double *weight[MAX_PLANES];
void (*rdft_horizontal)(struct FFTFILTContext *s, AVFrame *in, int w, int h, int plane);
void (*irdft_horizontal)(struct FFTFILTContext *s, AVFrame *out, int w, int h, int plane);
Reported by FlawFinder.
libavfilter/vf_fieldhint.c
1 issues
Line: 115
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
AVFilterLink *outlink = ctx->outputs[0];
FieldHintContext *s = ctx->priv;
AVFrame *out, *top, *bottom;
char buf[1024] = { 0 };
int64_t tf, bf;
int tfactor = 0, bfactor = 1;
char hint = '=', field = '=';
int p;
Reported by FlawFinder.
libavfilter/vf_find_rect.c
1 issues
Line: 190
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
float best_score;
int best_x, best_y;
int i;
char buf[32];
foc->haystack_frame[0] = av_frame_clone(in);
for (i=1; i<foc->mipmaps; i++) {
foc->haystack_frame[i] = downscale(foc->haystack_frame[i-1]);
}
Reported by FlawFinder.
libavfilter/vf_hflip.c
1 issues
Line: 221
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
/* copy palette if required */
if (av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_PAL)
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
td.in = in, td.out = out;
ff_filter_execute(ctx, filter_slice, &td, NULL,
FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
Reported by FlawFinder.
libavfilter/vf_hwupload_cuda.c
1 issues
Line: 40
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 av_cold int cudaupload_init(AVFilterContext *ctx)
{
CudaUploadContext *s = ctx->priv;
char buf[64] = { 0 };
snprintf(buf, sizeof(buf), "%d", s->device_idx);
return av_hwdevice_ctx_create(&s->hwdevice, AV_HWDEVICE_TYPE_CUDA, buf, NULL, 0);
}
Reported by FlawFinder.
libavfilter/vf_lut.c
1 issues
Line: 64
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
typedef struct LutContext {
const AVClass *class;
uint16_t lut[4][256 * 256]; ///< lookup table for each component
char *comp_expr_str[4];
AVExpr *comp_expr[4];
int hsub, vsub;
double var_values[VAR_VARS_NB];
int is_rgb, is_yuv;
int is_planar;
Reported by FlawFinder.
libavfilter/vf_lut2.c
1 issues
Line: 58
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
FFFrameSync fs;
int odepth;
char *comp_expr_str[4];
AVExpr *comp_expr[4];
double var_values[VAR_VARS_NB];
uint16_t *lut[4]; ///< lookup table for each component
int width[4], height[4];
Reported by FlawFinder.
libavfilter/vf_neighbor_opencl.c
1 issues
Line: 41
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
cl_kernel kernel;
cl_command_queue command_queue;
char *matrix_str[4];
cl_float threshold[4];
cl_int coordinates;
cl_mem coord;
Reported by FlawFinder.
libavfilter/vf_ocr.c
1 issues
Line: 107
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
confs = TessBaseAPIAllWordConfidences(s->tess);
av_dict_set(metadata, "lavfi.ocr.text", result, 0);
for (int i = 0; confs[i] != -1; i++) {
char number[256];
snprintf(number, sizeof(number), "%d ", confs[i]);
av_dict_set(metadata, "lavfi.ocr.confidence", number, AV_DICT_APPEND);
}
Reported by FlawFinder.