The branch master has been updated via a73be798ced572a988d455d961a2387f6eccb549 (commit) from 8b8d963db5bb619fbada014f294fd09a855a2650 (commit)
- Log ----------------------------------------------------------------- commit a73be798ced572a988d455d961a2387f6eccb549 Author: Kurt Roeckx <k...@roeckx.be> Date: Sat Aug 6 19:16:00 2016 +0200 Fix off by 1 in ASN1_STRING_set() Reviewed-by: Rich Salz <rs...@openssl.org> MR: #3176 ----------------------------------------------------------------------- Summary of changes: crypto/asn1/asn1_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index f2f07ac..9dfe395 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -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) { _____ openssl-commits mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits