mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
avutil/frame: Check log2_crop_align
Fixes: CID1604586 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
82f5b20ff5
commit
15540b3d28
@ -1107,7 +1107,7 @@ int av_frame_apply_cropping(AVFrame *frame, int flags)
|
|||||||
if (log2_crop_align < min_log2_align)
|
if (log2_crop_align < min_log2_align)
|
||||||
return AVERROR_BUG;
|
return AVERROR_BUG;
|
||||||
|
|
||||||
if (min_log2_align < 5) {
|
if (min_log2_align < 5 && log2_crop_align != INT_MAX) {
|
||||||
frame->crop_left &= ~((1 << (5 + log2_crop_align - min_log2_align)) - 1);
|
frame->crop_left &= ~((1 << (5 + log2_crop_align - min_log2_align)) - 1);
|
||||||
calc_cropping_offsets(offsets, frame, desc);
|
calc_cropping_offsets(offsets, frame, desc);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user