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

Commit e42038e5 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

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

Change-Id: I954737558188868ffe66a844acc4b268dc2918f4
parents ab9bfb83 8710f466
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; }