[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Kurt Roeckx
kurt at openssl.org
Sat Aug 20 17:01:58 UTC 2016
The branch OpenSSL_1_0_2-stable has been updated
via 061d6c25ba7cb0524756a872e92da1de2d494d68 (commit)
from ff5537c25565ad288ef00d67120b479c615bc6d3 (commit)
- Log -----------------------------------------------------------------
commit 061d6c25ba7cb0524756a872e92da1de2d494d68
Author: Kurt Roeckx <kurt at roeckx.be>
Date: Sat Aug 6 19:16:00 2016 +0200
Fix off by 1 in ASN1_STRING_set()
Reviewed-by: Rich Salz <rsalz at openssl.org>
MR: #3176
(cherry picked from commit a73be798ced572a988d455d961a2387f6eccb549)
-----------------------------------------------------------------------
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 80f5f2b..e63e82a 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);
More information about the openssl-commits
mailing list