Fixes: CID1476303 Bad bit shift operation Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/dpx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 8e77c09bb1..3563bdc538 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -242,7 +242,7 @@ static int decode_frame(AVCodecContext *avctx, return AVERROR_PATCHWELCOME; } - if (bits_per_color > 32) + if (bits_per_color > 31) return AVERROR_INVALIDDATA; buf += 820; @@ -319,7 +319,7 @@ static int decode_frame(AVCodecContext *avctx, minCV = av_int2float(i); maxCV = av_int2float(j); if (bits_per_color >= 1 && - minCV == 0.0f && maxCV == ((1<<bits_per_color) - 1)) { + minCV == 0.0f && maxCV == ((1U<<bits_per_color) - 1)) { avctx->color_range = AVCOL_RANGE_JPEG; } else if (bits_per_color >= 8 && minCV == (1 <<(bits_per_color - 4)) && -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".