Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-08-24 06:56:02 +0300
committerCQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>2016-08-24 07:40:39 +0300
commitc72e6f9c69952becb3e29a198f831e06f2c34dea (patch)
tree859c286290f319e1a1ef9631c1094d29efa6452b /crypto
parent311c2579f7f9ac659bd75aefb6609cfb9a478629 (diff)
Fix off by 1 in ASN1_STRING_set()
(Imported from upstream's 061d6c25ba7cb0524756a872e92da1de2d494d68.) Change-Id: I817c5919a48316401a028f6dbc16461e8599fe1d Reviewed-on: https://boringssl-review.googlesource.com/10560 Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/asn1_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c
index fc5b9d58..9b4e1664 100644
--- a/crypto/asn1/asn1_lib.c
+++ b/crypto/asn1/asn1_lib.c
@@ -386,7 +386,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);