diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-19 08:30:05 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-20 23:18:50 +0200 |
commit | 57e570b508d967785b758e54c505db76c1597927 (patch) | |
tree | 7e76ab18b9a24e60ac1c5434d960a6530026ad17 /tests/checkasm/sw_scale.c | |
parent | c53f9f436440be4e180aa3895920ef21019c076f (diff) | |
download | ffmpeg-57e570b508d967785b758e54c505db76c1597927.tar.gz |
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>
Diffstat (limited to 'tests/checkasm/sw_scale.c')
-rw-r--r-- | tests/checkasm/sw_scale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c index 2680e47897..9efa2b4def 100644 --- a/tests/checkasm/sw_scale.c +++ b/tests/checkasm/sw_scale.c @@ -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]); |