summaryrefslogtreecommitdiffstats
path: root/src/crypto/asn1/a_bitstr.c
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2015-09-25 00:44:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-25 00:44:37 +0000
commite246de8f184e644debf965ecdca552f006b56881 (patch)
treedc62c249d595198e0d99e43890019d21e901fbec /src/crypto/asn1/a_bitstr.c
parentc737bc23bc868fff21e5c1b95940813f709ea550 (diff)
parent00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872 (diff)
downloadexternal_boringssl-e246de8f184e644debf965ecdca552f006b56881.zip
external_boringssl-e246de8f184e644debf965ecdca552f006b56881.tar.gz
external_boringssl-e246de8f184e644debf965ecdca552f006b56881.tar.bz2
am 00bc53f6: am a04d78d3: Revert "external/boringssl: sync with upstream."
* commit '00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872': Revert "external/boringssl: sync with upstream."
Diffstat (limited to 'src/crypto/asn1/a_bitstr.c')
-rw-r--r--src/crypto/asn1/a_bitstr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/crypto/asn1/a_bitstr.c b/src/crypto/asn1/a_bitstr.c
index 8bad339..8055f0c 100644
--- a/src/crypto/asn1/a_bitstr.c
+++ b/src/crypto/asn1/a_bitstr.c
@@ -125,7 +125,8 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
if (len < 1)
{
- OPENSSL_PUT_ERROR(ASN1, ASN1_R_STRING_TOO_SHORT);
+ OPENSSL_PUT_ERROR(ASN1, c2i_ASN1_BIT_STRING,
+ ASN1_R_STRING_TOO_SHORT);
goto err;
}
@@ -140,7 +141,8 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
padding = *(p++);
if (padding > 7)
{
- OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_BIT_STRING_BITS_LEFT);
+ OPENSSL_PUT_ERROR(ASN1, c2i_ASN1_BIT_STRING,
+ ASN1_R_INVALID_BIT_STRING_BITS_LEFT);
goto err;
}
@@ -155,7 +157,8 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
s=(unsigned char *)OPENSSL_malloc((int)len);
if (s == NULL)
{
- OPENSSL_PUT_ERROR(ASN1, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(ASN1, c2i_ASN1_BIT_STRING,
+ ERR_R_MALLOC_FAILURE);
goto err;
}
memcpy(s,p,(int)len);
@@ -206,7 +209,7 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
w+1);
if (c == NULL)
{
- OPENSSL_PUT_ERROR(ASN1, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(ASN1, ASN1_BIT_STRING_set_bit, ERR_R_MALLOC_FAILURE);
return 0;
}
if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length);