mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
checkasm/sw_scale: Fix stack-buffer-overflow
A buffer whose size is not a multiple of four has been initialized using consecutive writes of 32bits. This results in a stack-buffer-overflow reported by ASAN in the checkasm-sw_scale FATE-test. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
c53f9f4364
commit
57e570b508
@ -53,7 +53,7 @@ static void check_hscale(void)
|
||||
struct SwsContext *ctx;
|
||||
|
||||
// padded
|
||||
LOCAL_ALIGNED_32(uint8_t, src, [SRC_PIXELS + MAX_FILTER_WIDTH - 1]);
|
||||
LOCAL_ALIGNED_32(uint8_t, src, [FFALIGN(SRC_PIXELS + MAX_FILTER_WIDTH - 1, 4)]);
|
||||
LOCAL_ALIGNED_32(uint32_t, dst0, [SRC_PIXELS]);
|
||||
LOCAL_ALIGNED_32(uint32_t, dst1, [SRC_PIXELS]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user