diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-01 21:44:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-09 16:17:40 +0200 |
commit | d7924a4f60f2088de1e6790345caba929eb97030 (patch) | |
tree | 18e767c2460e5966000c70bd2820aef28781fa25 /libavcodec/cbs_av1.c | |
parent | f44f44155533822922f6d2f24e5c53c14e432612 (diff) | |
download | ffmpeg-d7924a4f60f2088de1e6790345caba929eb97030.tar.gz |
avcodec/cbs_av1: Avoid shift overflow
Fixes: CID1465488 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/cbs_av1.c')
-rw-r--r-- | libavcodec/cbs_av1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c index 1d9ac5ab44..fb82996022 100644 --- a/libavcodec/cbs_av1.c +++ b/libavcodec/cbs_av1.c @@ -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(); |