diff options
author | Janne Grunau <janne-libav@jannau.net> | 2014-03-05 15:44:57 +0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2014-05-10 19:11:43 +0400 |
commit | 40ffa99dfa39c574d8784a3c4eaf6406198d675d (patch) | |
tree | 324be83507bebfeffc0e5581e0b09fd71d2fb945 /libavcodec/arm | |
parent | ff79f6b35a94dde69b3d52bd2abdfdb793f525c3 (diff) |
arm: hpeldsp: prevent overreads in armv6 asm
Based on a patch by Russel King <rmk+libav@arm.linux.org.uk>
Bug-Id: 646
CC: libav-stable@libav.org
(cherry picked from commit cbddee1cca0ebd01e8c5aa694d31228eb4de4b41)
Diffstat (limited to 'libavcodec/arm')
-rw-r--r-- | libavcodec/arm/hpeldsp_armv6.S | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/arm/hpeldsp_armv6.S b/libavcodec/arm/hpeldsp_armv6.S index f1abc328eb..984e0f0e32 100644 --- a/libavcodec/arm/hpeldsp_armv6.S +++ b/libavcodec/arm/hpeldsp_armv6.S @@ -132,11 +132,12 @@ function ff_put_pixels8_y2_armv6, export=1 uhadd8 r9, r5, r7 eor r11, r5, r7 and r10, r10, r12 - ldr_pre r4, r1, r2 + ldrc_pre ne, r4, r1, r2 uadd8 r8, r8, r10 and r11, r11, r12 uadd8 r9, r9, r11 - ldr r5, [r1, #4] + it ne + ldrne r5, [r1, #4] uhadd8 r10, r4, r6 eor r6, r4, r6 uhadd8 r11, r5, r7 @@ -193,9 +194,10 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1 1: subs r3, r3, #2 uhadd8 r8, r4, r6 - ldr_pre r4, r1, r2 + ldrc_pre ne, r4, r1, r2 uhadd8 r9, r5, r7 - ldr r5, [r1, #4] + it ne + ldrne r5, [r1, #4] uhadd8 r12, r4, r6 ldrc_pre ne, r6, r1, r2 uhadd8 r14, r5, r7 |