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
1 changed files with 2 additions and 2 deletions

View File

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