mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
avcodec/cbs_av1: Avoid shift overflow
Fixes: CID1465488 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f44f441555
commit
d7924a4f60
@ -301,7 +301,7 @@ static int cbs_av1_write_increment(CodedBitstreamContext *ctx, PutBitContext *pb
|
||||
return AVERROR(ENOSPC);
|
||||
|
||||
if (len > 0)
|
||||
put_bits(pbc, len, (1 << len) - 1 - (value != range_max));
|
||||
put_bits(pbc, len, (1U << len) - 1 - (value != range_max));
|
||||
|
||||
CBS_TRACE_WRITE_END_NO_SUBSCRIPTS();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user