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

Commit 8f6c537f authored by Lajos Molnar's avatar Lajos Molnar
Browse files

[automerger] stagefright: avoid buffer overflow in base64 decoder am: 5e96386a am: 5045de6f

Change-Id: Iddb5c897937a3acd8ee404a0d1f71ec5da22738e
parents 6d050827 5045de6f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -78,8 +78,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; }