Commit 70a06fc1 authored by Rob Percival's avatar Rob Percival
Browse files

Subtract padding from outlen in ct_base64_decode

parent f7a39a5a
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: