Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 488d3706 authored by Dan Austin's avatar Dan Austin
Browse files

Disable integer overflow sanitization in select functions.

There are multiple benign integer overflows in the Sad8x8 and
getBlockSum functions. Disable integer overflow sanitization
to avoid potential SIGABRTs within these functions.

Bug: 23756200
Change-Id: Idf0c4a803d56862997b9cd542eda14251b84ee19
parent 0ca175b8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -527,6 +527,9 @@ Int getBlockSAV(Short block[])
/*  Modified :                                                              */
/*      8/15/01,  - do 4 pixel at a time    assuming 32 bit register        */
/* ======================================================================== */
#ifdef __clang__
__attribute((no_sanitize("integer")))
#endif
Int Sad8x8(UChar *cur, UChar *prev, Int width)
{
    UChar *end = cur + (width << 3);
@@ -590,7 +593,9 @@ Int Sad8x8(UChar *cur, UChar *prev, Int width)
/*  Modified :                                                              */
/*          8/15/01,  - SIMD 4 pixels at a time                         */
/* ======================================================================== */

#ifdef __clang__
__attribute((no_sanitize("integer")))
#endif
Int getBlockSum(UChar *cur, Int width)
{
    Int sad = 0, sum4 = 0, sum2 = 0;