aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-01-20 18:46:01 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-12 17:10:35 +0100
commita45b8af839fd44e52b77a2436a465939969a6d11 (patch)
treec41eb0787d5c78f2add0a9c74c92a6da72e6cc91
parenta443b48ccfca1ac82f86f9402c3f4f06d727826d (diff)
downloadffmpeg-a45b8af839fd44e52b77a2436a465939969a6d11.tar.gz
libavcodec/ppc/mpegvideoencdsp.c: fix stack smashing in pix_norm1_altivec() and pix_sum_altivec()
The vec_ste calls were mistakenly changed to vec_vsx_st in c5ca76a, which caused stack smashing. Changing them back fixes crashes on ppc64el, when configured with --toolchain=hardened. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 840c3c05316a59c70a7470ed27aaa9c2f3ba410a) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/ppc/mpegvideoencdsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ppc/mpegvideoencdsp.c b/libavcodec/ppc/mpegvideoencdsp.c
index e91ba5d25f..3e6765ce15 100644
--- a/libavcodec/ppc/mpegvideoencdsp.c
+++ b/libavcodec/ppc/mpegvideoencdsp.c
@@ -55,7 +55,7 @@ static int pix_norm1_altivec(uint8_t *pix, int line_size)
/* Sum up the four partial sums, and put the result into s. */
sum = vec_sums((vector signed int) sv, (vector signed int) zero);
sum = vec_splat(sum, 3);
- vec_vsx_st(sum, 0, &s);
+ vec_ste(sum, 0, &s);
return s;
}
#else
@@ -113,7 +113,7 @@ static int pix_sum_altivec(uint8_t *pix, int line_size)
/* Sum up the four partial sums, and put the result into s. */
sumdiffs = vec_sums((vector signed int) sad, (vector signed int) zero);
sumdiffs = vec_splat(sumdiffs, 3);
- vec_vsx_st(sumdiffs, 0, &s);
+ vec_ste(sumdiffs, 0, &s);
return s;
}
#else