diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-22 22:59:29 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-22 23:26:00 +0300 |
commit | fc8cff96ed45dfdb91ed03e9942845f28be0e770 (patch) | |
tree | cb8261f875cb4cb1c736c4d5e7580fdf4179801d /libavcodec/h264_cavlc.c | |
parent | 207e6debf866ae4f8bdf864a5f389ef42660324d (diff) |
avcodec/h264_cavlc: Fix undefined behavior on qscale overflow
Fixes: 1214/clusterfuzz-testcase-minimized-6130606599569408
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_cavlc.c')
-rw-r--r-- | libavcodec/h264_cavlc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index 069b52129c..72dfaaab45 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -1112,7 +1112,7 @@ decode_intra_mb: dquant= get_se_golomb(&sl->gb); - sl->qscale += dquant; + sl->qscale += (unsigned)dquant; if (((unsigned)sl->qscale) > max_qp){ if (sl->qscale < 0) sl->qscale += max_qp + 1; |