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
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-06-27 22:29:28 +0300
committerAdam Langley <agl@google.com>2015-07-01 22:39:16 +0300
commitd13a5e15d4e4eb51513be665306a2beba39869df (patch)
tree746afb4f81c693c85342fdcbc7917b7830a3539e /crypto/bytestring
parent961ad6ad2c31edfa7b857e79b8b8cb3354573304 (diff)
Fix crypto/bytestring test for too long lengths.
kData5 was meant to test lengths that are too long, but the input gets rejected earlier for not using short-form encoding. Switch it to testing a badly encoded element of length 128, the shortest element that uses long-form encoding. Change-Id: I35f4df89bfa7a681698eda569c525b5871288487 Reviewed-on: https://boringssl-review.googlesource.com/5264 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bytestring')
-rw-r--r--crypto/bytestring/bytestring_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bytestring/bytestring_test.cc b/crypto/bytestring/bytestring_test.cc
index 66e9c1e0..870d7c6a 100644
--- a/crypto/bytestring/bytestring_test.cc
+++ b/crypto/bytestring/bytestring_test.cc
@@ -109,7 +109,7 @@ static bool TestGetASN1() {
static const uint8_t kData2[] = {0x30, 3, 1, 2};
static const uint8_t kData3[] = {0x30, 0x80};
static const uint8_t kData4[] = {0x30, 0x81, 1, 1};
- static const uint8_t kData5[] = {0x30, 0x82, 0, 1, 1};
+ static const uint8_t kData5[4 + 0x80] = {0x30, 0x82, 0, 0x80};
static const uint8_t kData6[] = {0xa1, 3, 0x4, 1, 1};
static const uint8_t kData7[] = {0xa1, 3, 0x4, 2, 1};
static const uint8_t kData8[] = {0xa1, 3, 0x2, 1, 1};