projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop raising ERR_R_MALLOC_FAILURE in most places
[openssl.git]
/
crypto
/
asn1
/
asn1_gen.c
diff --git
a/crypto/asn1/asn1_gen.c
b/crypto/asn1/asn1_gen.c
index c590c62fc2b6f59d198831986b1dd4a709960176..a7ec79faa9eaf7116fef843abf5b4d40e6c58ba9 100644
(file)
--- a/
crypto/asn1/asn1_gen.c
+++ b/
crypto/asn1/asn1_gen.c
@@
-581,7
+581,7
@@
static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype)
int no_unused = 1;
if ((atmp = ASN1_TYPE_new()) == NULL) {
int no_unused = 1;
if ((atmp = ASN1_TYPE_new()) == NULL) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_
MALLOC_FAILURE
);
+ ERR_raise(ERR_LIB_ASN1, ERR_R_
ASN1_LIB
);
return NULL;
}
return NULL;
}
@@
-642,11
+642,11
@@
static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype)
goto bad_form;
}
if ((atmp->value.asn1_string = ASN1_STRING_new()) == NULL) {
goto bad_form;
}
if ((atmp->value.asn1_string = ASN1_STRING_new()) == NULL) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_
MALLOC_FAILURE
);
+ ERR_raise(ERR_LIB_ASN1, ERR_R_
ASN1_LIB
);
goto bad_str;
}
if (!ASN1_STRING_set(atmp->value.asn1_string, str, -1)) {
goto bad_str;
}
if (!ASN1_STRING_set(atmp->value.asn1_string, str, -1)) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_
MALLOC_FAILURE
);
+ ERR_raise(ERR_LIB_ASN1, ERR_R_
ASN1_LIB
);
goto bad_str;
}
atmp->value.asn1_string->type = utype;
goto bad_str;
}
atmp->value.asn1_string->type = utype;
@@
-677,7
+677,7
@@
static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype)
if (ASN1_mbstring_copy(&atmp->value.asn1_string, (unsigned char *)str,
-1, format, ASN1_tag2bit(utype)) <= 0) {
if (ASN1_mbstring_copy(&atmp->value.asn1_string, (unsigned char *)str,
-1, format, ASN1_tag2bit(utype)) <= 0) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_
MALLOC_FAILURE
);
+ ERR_raise(ERR_LIB_ASN1, ERR_R_
ASN1_LIB
);
goto bad_str;
}
goto bad_str;
}
@@
-686,7
+686,7
@@
static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype)
case V_ASN1_BIT_STRING:
case V_ASN1_OCTET_STRING:
if ((atmp->value.asn1_string = ASN1_STRING_new()) == NULL) {
case V_ASN1_BIT_STRING:
case V_ASN1_OCTET_STRING:
if ((atmp->value.asn1_string = ASN1_STRING_new()) == NULL) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_
MALLOC_FAILURE
);
+ ERR_raise(ERR_LIB_ASN1, ERR_R_
ASN1_LIB
);
goto bad_form;
}
goto bad_form;
}
@@
-750,7
+750,7
@@
static int bitstr_cb(const char *elem, int len, void *bitstr)
return 0;
}
if (!ASN1_BIT_STRING_set_bit(bitstr, bitnum, 1)) {
return 0;
}
if (!ASN1_BIT_STRING_set_bit(bitstr, bitnum, 1)) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_
MALLOC_FAILURE
);
+ ERR_raise(ERR_LIB_ASN1, ERR_R_
ASN1_LIB
);
return 0;
}
return 1;
return 0;
}
return 1;