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

Commit 8710f466 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

[automerger] stagefright: avoid buffer overflow in base64 decoder am: b4d9e1b4

Change-Id: I9ba3a1d3deffa395ef454da57bfeb4200943f190
parents 7445f0e4 b4d9e1b4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -74,8 +74,7 @@ sp<ABuffer> decodeBase64(const AString &s) {
        accum = (accum << 6) | value;

        if (((i + 1) % 4) == 0) {
            out[j++] = (accum >> 16);

            if (j < outLen) { out[j++] = (accum >> 16); }
            if (j < outLen) { out[j++] = (accum >> 8) & 0xff; } 
            if (j < outLen) { out[j++] = accum & 0xff; }