diff options
author | David Benjamin <davidben@google.com> | 2016-08-24 06:56:02 +0300 |
---|---|---|
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | 2016-08-24 07:40:39 +0300 |
commit | c72e6f9c69952becb3e29a198f831e06f2c34dea (patch) | |
tree | 859c286290f319e1a1ef9631c1094d29efa6452b /crypto | |
parent | 311c2579f7f9ac659bd75aefb6609cfb9a478629 (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.c | 2 |
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); |