1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swscale/swscale_internal: Avoid unsigned for slice parameters

Mixing unsigned and signed often leads to unexpected arithmetic results.
Fixes: out of array write
Found-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2021-09-30 17:52:53 +02:00
parent 35d784aca9
commit 9f40b5badb

View File

@ -311,8 +311,8 @@ typedef struct SwsContext {
int nb_slice_ctx; int nb_slice_ctx;
// values passed to current sws_receive_slice() call // values passed to current sws_receive_slice() call
unsigned int dst_slice_start; int dst_slice_start;
unsigned int dst_slice_height; int dst_slice_height;
/** /**
* Note that src, dst, srcStride, dstStride will be copied in the * Note that src, dst, srcStride, dstStride will be copied in the