From: Mathieu Malaterre Date: Sat, 10 Oct 2015 16:38:08 +0000 (+0200) Subject: Add paranoid sentinels X-Git-Tag: v2.1.1~22^2~25^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc869c2985c8ee346089e61414899ae7aa2e00f5;p=openjpeg Add paranoid sentinels --- 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;