openssl/crypto/asn1
Benjamin Kaduk 90b4247cc5 Check ASN1_item_ndef_i2d() return value.
Return an error instead of trying to malloc a negative number.
The other usage in this file already had a similar check, and the caller
should have put an entry on the error stack already.

Note that we only check the initial calls to obtain the encoded length,
and assume that the follow-up call to actually encode to the allocated
storage will succeed if the first one did.

Fixes: #14177

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14308)
2021-02-26 15:42:59 -08:00
..
a_bitstr.c Update copyright year 2020-11-26 14:18:57 +00:00
a_d2i_fp.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
a_digest.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
a_dup.c X509_dup: fix copying of libctx and propq using new ASN1_OP_DUP_POST cb operation 2020-11-27 16:53:32 +01:00
a_gentm.c
a_i2d_fp.c Update copyright year 2020-11-26 14:18:57 +00:00
a_int.c Fix instances of pointer addition with the NULL pointer 2020-11-30 10:37:14 +00:00
a_mbstr.c Update copyright year 2020-11-26 14:18:57 +00:00
a_object.c Update copyright year 2020-11-26 14:18:57 +00:00
a_octet.c
a_print.c
a_sign.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
a_strex.c Update copyright year 2020-11-26 14:18:57 +00:00
a_strnid.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
a_time.c Update copyright year 2021-01-28 13:54:57 +01:00
a_type.c
a_utctm.c
a_utf8.c
a_verify.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
ameth_lib.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
asn1_err.c Check that multi-strings/CHOICE types don't use implicit tagging 2020-12-08 10:17:03 +00:00
asn1_gen.c CRYPTO: refactor ERR_raise()+ERR_add_error_data() to ERR_raise_data() 2020-11-13 09:35:31 +01:00
asn1_item_list.c Update copyright year 2020-11-26 14:18:57 +00:00
asn1_item_list.h Update copyright year 2021-01-28 13:54:57 +01:00
asn1_lib.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
asn1_local.h
asn1_par.c remove unused assignments 2020-12-03 11:21:33 +10:00
asn_mime.c CRYPTO: refactor ERR_raise()+ERR_add_error_data() to ERR_raise_data() 2020-11-13 09:35:31 +01:00
asn_moid.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
asn_mstbl.c CRYPTO: refactor ERR_raise()+ERR_add_error_data() to ERR_raise_data() 2020-11-13 09:35:31 +01:00
asn_pack.c Update copyright year 2020-11-26 14:18:57 +00:00
bio_asn1.c Update copyright year 2020-11-26 14:18:57 +00:00
bio_ndef.c Check ASN1_item_ndef_i2d() return value. 2021-02-26 15:42:59 -08:00
build.info Adapt libcrypto functionality to specify the desired output structure 2020-11-11 12:43:27 +01:00
charmap.h Update copyright years of auto-generated headers (make update) 2021-01-04 07:15:24 +01:00
charmap.pl
d2i_param.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
d2i_pr.c Add back in legacy paths for d2i_PrivateKey/d2i_AutoPrivateKey. 2021-02-23 09:25:58 +01:00
d2i_pu.c Drop OPENSSL_NO_RSA everywhere 2020-12-20 12:19:42 +01:00
evp_asn1.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
f_int.c Update copyright year 2020-11-26 14:18:57 +00:00
f_string.c Update copyright year 2020-11-26 14:18:57 +00:00
i2d_evp.c Update copyright year 2021-02-18 15:05:17 +00:00
n_pkey.c
nsseq.c
p5_pbe.c Update copyright year 2020-11-26 14:18:57 +00:00
p5_pbev2.c Update copyright year 2020-11-26 14:18:57 +00:00
p5_scrypt.c Update copyright year 2020-11-26 14:18:57 +00:00
p8_pkey.c
standard_methods.h Drop OPENSSL_NO_RSA everywhere 2020-12-20 12:19:42 +01:00
t_bitst.c
t_pkey.c
t_spki.c
tasn_dec.c Check that multi-strings/CHOICE types don't use implicit tagging 2020-12-08 10:17:03 +00:00
tasn_enc.c Complain if we are attempting to encode with an invalid ASN.1 template 2020-12-08 10:17:03 +00:00
tasn_fre.c Fix safestack issues in asn1t.h 2020-09-13 11:10:41 +01:00
tasn_new.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
tasn_prn.c Update copyright year 2020-11-26 14:18:57 +00:00
tasn_scn.c Update copyright year 2020-11-26 14:18:57 +00:00
tasn_typ.c
tasn_utl.c Update copyright year 2020-11-26 14:18:57 +00:00
tbl_standard.h Update copyright year 2020-10-15 14:10:06 +01:00
x_algor.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
x_bignum.c
x_info.c Update copyright year 2020-11-26 14:18:57 +00:00
x_int64.c Update copyright year 2020-11-26 14:18:57 +00:00
x_long.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
x_pkey.c Update copyright year 2020-11-26 14:18:57 +00:00
x_sig.c
x_spki.c
x_val.c