Commit bb2b6b6c authored by Rob Percival's avatar Rob Percival Committed by Rich Salz
Browse files

Subtract padding from outlen in ct_base64_decode



Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1548)
(cherry picked from commit 70a06fc1)
parent 189d4e09
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -45,6 +45,11 @@ static int ct_base64_decode(const char *in, unsigned char **out)
        goto err;
    }

    /* Subtract padding bytes from |outlen| */
    while (in[--inlen] == '=') {
        --outlen;
    }

    *out = outbuf;
    return outlen;
err: