diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-30 16:01:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-08-20 14:38:26 +0200 |
commit | 3dfadef52216a858ca75a28cc6dfa9620a203c4d (patch) | |
tree | 84f6c9a6274393278e5596634b5ab360695e2596 /libavfilter/vf_transpose.c | |
parent | e35c5348900a371c467816a9189031192f08865a (diff) | |
download | ffmpeg-3dfadef52216a858ca75a28cc6dfa9620a203c4d.tar.gz |
avfilter/vf_transpose: Fix rounding error
Fixes out of array access
Fixes: asan_heap-oob_7f875d_3482_cov_1818465256_ssudec.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0083c16605aa5997534e87e68f97ef85a8c3b7b8)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_transpose.c')
-rw-r--r-- | libavfilter/vf_transpose.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index d9b165cfeb..6ae5fce815 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -152,7 +152,7 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int hsub = plane == 1 || plane == 2 ? trans->hsub : 0; int vsub = plane == 1 || plane == 2 ? trans->vsub : 0; int pixstep = trans->pixsteps[plane]; - int inh = in->height >> vsub; + int inh = FF_CEIL_RSHIFT(in->height, vsub); int outw = FF_CEIL_RSHIFT(out->width, hsub); int outh = FF_CEIL_RSHIFT(out->height, vsub); int start = (outh * jobnr ) / nb_jobs; |