diff options
author | Jessica Wagantall <jwagantall@cyngn.com> | 2016-07-07 11:51:01 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-07-07 14:14:58 -0700 |
commit | 9eeaa8c0f3b6324cc1cd518e18b33f2032bb173c (patch) | |
tree | 5c5998cb40c883d711b294bc82700b23665c0a96 /src | |
parent | 95d9351415d3cf79d69ce05271235ef3ccafe318 (diff) | |
parent | 74750e1fb24149043a533497f79c577b704d6e30 (diff) | |
download | external_boringssl-9eeaa8c0f3b6324cc1cd518e18b33f2032bb173c.zip external_boringssl-9eeaa8c0f3b6324cc1cd518e18b33f2032bb173c.tar.gz external_boringssl-9eeaa8c0f3b6324cc1cd518e18b33f2032bb173c.tar.bz2 |
Merge remote-tracking branch 'remotes/android-6.0.1_r52' into HEAD
Ticket: CYNGNOS-3020
Change-Id: Ie0229820d2b426f83b9e29dc8ccb824ee627579a
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/asn1/a_int.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crypto/asn1/a_int.c b/src/crypto/asn1/a_int.c index 2ecccc5..16b8950 100644 --- a/src/crypto/asn1/a_int.c +++ b/src/crypto/asn1/a_int.c @@ -125,6 +125,8 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) { ret=a->length; i=a->data[0]; + if (ret == 1 && i == 0) + neg=0; if (!neg && (i > 127)) { pad=1; pb=0; @@ -158,7 +160,7 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) p += a->length - 1; i = a->length; /* Copy zeros to destination as long as source is zero */ - while(!*n) { + while(!*n && i > 1) { *(p--) = 0; n--; i--; |