Fix off by 1 in ASN1_STRING_set()
Reviewed-by: Rich Salz <rsalz@openssl.org> MR: #3176
This commit is contained in:
parent
8b8d963db5
commit
a73be798ce
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue