Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-10-08 00:22:59 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-10-18 22:27:23 +0300
commit182d7a74276ea70aec6d3d7bd9a1da3d327358f2 (patch)
treee3311043db58fc54719b854c17d02875c1f6f379 /libavcodec/h264_slice.c
parentcc072f7353d5d73d86650a68b7d79832fb4338cd (diff)
avcodec/h264_slice: fix undefined integer overflow with POC in error concealment
Alternatively the POC could be changed to 64bit. the large values seem to be within what is allowed. Fixes: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int' Fixes: 26076/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5711127201447936 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 74575bccd4..fa7a639053 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1606,7 +1606,7 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
prev->f->format,
prev->f->width,
prev->f->height);
- h->short_ref[0]->poc = prev->poc + 2;
+ h->short_ref[0]->poc = prev->poc + 2U;
} else if (!h->frame_recovered && !h->avctx->hwaccel)
ff_color_frame(h->short_ref[0]->f, c);
h->short_ref[0]->frame_num = h->poc.prev_frame_num;