diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-01 15:13:21 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-02 05:15:00 +0200 |
commit | 2c38ca3d37242c47a31dfa3edaf25592cefffa44 (patch) | |
tree | 04fe4ba4722f85d0f2aa4cc6946ecadd3c2c0361 | |
parent | 00d029d5c0b7029720265d579389a348220decfb (diff) | |
download | ffmpeg-2c38ca3d37242c47a31dfa3edaf25592cefffa44.tar.gz |
avcodec/hevc_ps: Fix UB 1 << 31
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/hevc_ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 7b486ce0af..1caaeb0b61 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -200,7 +200,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, } for (unsigned i = 0; i < FF_ARRAY_ELEMS(used); i++) - rps->used |= used[i] * (1 << i); + rps->used |= (uint32_t)used[i] << i; } else { unsigned int nb_positive_pics; |