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>
pull/369/head
Michael Niedermayer 3 years ago
parent 35d784aca9
commit 9f40b5badb
  1. 4
      libswscale/swscale_internal.h

@ -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

Loading…
Cancel
Save