diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2016-08-06 19:16:00 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2016-08-20 19:01:47 +0200 |
commit | 061d6c25ba7cb0524756a872e92da1de2d494d68 (patch) | |
tree | 46adfe750668e6a46b6e039f7892235dc813097c /crypto/asn1 | |
parent | ff5537c25565ad288ef00d67120b479c615bc6d3 (diff) |
Fix off by 1 in ASN1_STRING_set()
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR: #3176
(cherry picked from commit a73be798ced572a988d455d961a2387f6eccb549)
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/asn1_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index 80f5f2b014..e63e82a8b4 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -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); |