summaryrefslogtreecommitdiff
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-30 17:52:53 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-30 19:47:15 +0200
commit9f40b5badbead0f454f195e88b4dc7950b40f665 (patch)
treeec5074da4d2841a30875b1b0289fe72113a87e5d /libswscale/swscale_internal.h
parent35d784aca98fbb626cd0675cde52b739ddeffce8 (diff)
downloadffmpeg-9f40b5badbead0f454f195e88b4dc7950b40f665.tar.gz
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>
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r--libswscale/swscale_internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index e6e7b934b6..708facba67 100644
--- a/libswscale/swscale_internal.h
+++ b/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