From dc869c2985c8ee346089e61414899ae7aa2e00f5 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Sat, 10 Oct 2015 18:38:08 +0200 Subject: [PATCH] Add paranoid sentinels --- src/lib/openjp2/mct.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/openjp2/mct.c b/src/lib/openjp2/mct.c index 8b0276f3..9bb01da4 100644 --- a/src/lib/openjp2/mct.c +++ b/src/lib/openjp2/mct.c @@ -81,6 +81,10 @@ void opj_mct_encode( { OPJ_SIZE_T i; const OPJ_SIZE_T len = n; + /* buffer are aligned on 16 bytes */ + assert( (uintptr_t)c0 & 16 == 0 ); + assert( (uintptr_t)c1 & 16 == 0 ); + assert( (uintptr_t)c2 & 16 == 0 ); for(i = 0; i < (len & ~3U); i += 4) { __m128i y, u, v; -- 2.50.1