提交 a73be798 编写于 作者: K Kurt Roeckx

Fix off by 1 in ASN1_STRING_set()

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

MR: #3176
上级 8b8d963d
......@@ -271,7 +271,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;
str->data = OPENSSL_realloc(c, len + 1);
if (str->data == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册