The following issues were found
libavcodec/alac.c
1 issues
Line: 188
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return;
if (!lpc_order) {
memcpy(&buffer_out[1], &error_buffer[1],
(nb_samples - 1) * sizeof(*buffer_out));
return;
}
if (lpc_order == 31) {
Reported by FlawFinder.
libavcodec/alacenc.c
1 issues
Line: 181
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
s->lpc[ch].lpc_order = opt_order;
s->lpc[ch].lpc_quant = shift[opt_order-1];
memcpy(s->lpc[ch].lpc_coeff, coefs[opt_order-1], opt_order*sizeof(int));
}
}
static int estimate_stereo_mode(int32_t *left_ch, int32_t *right_ch, int n)
{
Reported by FlawFinder.
libavcodec/alpha/me_cmp_alpha.c
1 issues
Line: 202
if ((size_t) pix2 & 0x7) {
uint64_t t, p2_l, p2_r;
t = ldq_u(pix2 + 8);
p2_l = extql(ldq_u(pix2), pix2) | extqh(t, pix2);
p2_r = extql(t, pix2) | extqh(ldq_u(pix2 + 16), pix2);
do {
uint64_t p1_l, p1_r, np2_l, np2_r;
uint64_t t;
Reported by Cppcheck.
libavcodec/amfenc_h264.c
1 issues
Line: 353
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
var.pInterface->pVtbl->Release(var.pInterface);
return AVERROR(ENOMEM);
}
memcpy(avctx->extradata, buffer->pVtbl->GetNative(buffer), avctx->extradata_size);
buffer->pVtbl->Release(buffer);
var.pInterface->pVtbl->Release(var.pInterface);
return 0;
Reported by FlawFinder.
libavcodec/amfenc_hevc.c
1 issues
Line: 288
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
var.pInterface->pVtbl->Release(var.pInterface);
return AVERROR(ENOMEM);
}
memcpy(avctx->extradata, buffer->pVtbl->GetNative(buffer), avctx->extradata_size);
buffer->pVtbl->Release(buffer);
var.pInterface->pVtbl->Release(var.pInterface);
return 0;
Reported by FlawFinder.
libavcodec/anm.c
1 issues
Line: 175
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
} while (bytestream2_get_bytes_left(&gb) > 0);
memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE);
*got_frame = 1;
if ((ret = av_frame_ref(data, s->frame)) < 0)
return ret;
Reported by FlawFinder.
libavcodec/argo.c
1 issues
Line: 662
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return ret;
if (avctx->pix_fmt == AV_PIX_FMT_PAL8)
memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
if ((ret = av_frame_ref(data, s->frame)) < 0)
return ret;
frame->pict_type = s->key ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
Reported by FlawFinder.
libavcodec/arm/hpeldsp_init_arm.c
1 issues
Line: 38
void ff_put_pixels16_arm(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h);
CALL_2X_PIXELS(ff_put_pixels16_x2_arm, ff_put_pixels8_x2_arm, 8)
CALL_2X_PIXELS(ff_put_pixels16_y2_arm, ff_put_pixels8_y2_arm, 8)
CALL_2X_PIXELS(ff_put_pixels16_xy2_arm, ff_put_pixels8_xy2_arm, 8)
CALL_2X_PIXELS(ff_put_no_rnd_pixels16_x2_arm, ff_put_no_rnd_pixels8_x2_arm, 8)
CALL_2X_PIXELS(ff_put_no_rnd_pixels16_y2_arm, ff_put_no_rnd_pixels8_y2_arm, 8)
CALL_2X_PIXELS(ff_put_no_rnd_pixels16_xy2_arm, ff_put_no_rnd_pixels8_xy2_arm,8)
Reported by Cppcheck.
libavcodec/ass.c
1 issues
Line: 78
Column: 35
CWE codes:
126
if (!avctx->subtitle_header)
return AVERROR(ENOMEM);
avctx->subtitle_header_size = strlen(avctx->subtitle_header);
return 0;
}
int ff_ass_subtitle_header(AVCodecContext *avctx,
const char *font, int font_size,
Reported by FlawFinder.
libavcodec/assdec.c
1 issues
Line: 36
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!avctx->subtitle_header)
return AVERROR(ENOMEM);
if (avctx->extradata_size)
memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
avctx->subtitle_header[avctx->extradata_size] = 0;
avctx->subtitle_header_size = avctx->extradata_size;
return 0;
}
Reported by FlawFinder.