Commit f3e01c8d authored by Kurt Roeckx's avatar Kurt Roeckx
Browse files

Fix off by 1 in ASN1_STRING_set()



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>

MR: #3176
(cherry picked from commit a73be798)
parent 19fca4ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
        else
            len = strlen(data);
    }
    if ((str->length < len) || (str->data == NULL)) {
    if ((str->length <= len) || (str->data == NULL)) {
        c = str->data;
        if (c == NULL)
            str->data = OPENSSL_malloc(len + 1);