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>
(cherry picked from commit fc8cff96ed)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
44eabc5d5d
commit
927ff67ab4
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue