!68 fix CVE-2022-3109

Merge pull request !68 from gg0907/master
This commit is contained in:
openharmony_ci 2022-12-30 08:49:41 +00:00 committed by Gitee
commit eda32382a1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2683,8 +2683,13 @@ static int vp3_decode_frame(AVCodecContext *avctx,
if ((ret = ff_thread_get_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF)) < 0)
goto error;
if (!s->edge_emu_buffer)
if (!s->edge_emu_buffer) {
s->edge_emu_buffer = av_malloc(9 * FFABS(s->current_frame.f->linesize[0]));
if (!s->edge_emu_buffer) {
ret = AVERROR(ENOMEM);
goto error;
}
}
if (s->keyframe) {
if (!s->theora) {