boringssl/crypto/asn1
David Benjamin e30f3fb080 ASN1_primitive_new NULL param handling
ASN1_primitive_new takes an ASN1_ITEM * param |it|. There are a couple
of conditional code paths that check whether |it| is NULL or not - but
later |it| is deref'd unconditionally. If |it| was ever really NULL then
this would seg fault. In practice ASN1_primitive_new is marked as an
internal function in the public header file. The only places it is ever
used internally always pass a non NULL parameter for |it|. Therefore, change
the code to sanity check that |it| is not NULL, and remove the conditional
checking.

(Imported from upstream's 9e488fd6ab2c295941e91a47ab7bcd346b7540c7)

Change-Id: Icbb13cd00d0ec5529871b678b0bcc465956a7572
Reviewed-on: https://boringssl-review.googlesource.com/4006
Reviewed-by: Adam Langley <agl@google.com>
2015-03-19 11:11:04 +00:00
..
a_bitstr.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_bool.c Inital import. 2014-06-20 13:17:32 -07:00
a_bytes.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_d2i_fp.c Error codes are uint32_t, not unsigned long. 2015-03-13 19:41:42 +00:00
a_dup.c Inital import. 2014-06-20 13:17:32 -07:00
a_enum.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_gentm.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_i2d_fp.c Inital import. 2014-06-20 13:17:32 -07:00
a_int.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_mbstr.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_object.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_octet.c Inital import. 2014-06-20 13:17:32 -07:00
a_print.c Remove CHARSET_EBCDIC 2014-07-07 19:30:35 +00:00
a_strnid.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_time.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_type.c Fix various certificate fingerprint issues. 2015-01-09 19:41:59 +00:00
a_utctm.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
a_utf8.c Inital import. 2014-06-20 13:17:32 -07:00
asn1_lib.c Fix cross-module errors. 2015-02-11 23:11:55 +00:00
asn1_locl.h Move the X509_NAME typedef into x509.h. 2014-10-28 22:38:38 +00:00
asn1_par.c Fix wrong numbers being passed as string lengths 2015-03-19 11:07:45 +00:00
asn_pack.c Remove some dead code. 2014-08-19 19:00:49 +00:00
bio_asn1.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
bio_ndef.c Fix two unchecked mallocs in crypto/asn1. 2015-03-10 02:31:29 +00:00
charmap.pl Tag a number of globals as const. 2015-01-14 21:53:00 +00:00
CMakeLists.txt Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
f_enum.c Fix a2i_ASN1_* leak on failure. 2014-11-06 01:29:59 +00:00
f_int.c Fix a2i_ASN1_* leak on failure. 2014-11-06 01:29:59 +00:00
f_string.c Fix a2i_ASN1_* leak on failure. 2014-11-06 01:29:59 +00:00
t_bitst.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
t_pkey.c Inital import. 2014-06-20 13:17:32 -07:00
tasn_dec.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
tasn_enc.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
tasn_fre.c Inital import. 2014-06-20 13:17:32 -07:00
tasn_new.c ASN1_primitive_new NULL param handling 2015-03-19 11:11:04 +00:00
tasn_prn.c Const correctness. 2014-06-20 13:17:36 -07:00
tasn_typ.c Inital import. 2014-06-20 13:17:32 -07:00
tasn_utl.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
x_bignum.c Tag a number of globals as const. 2015-01-14 21:53:00 +00:00
x_long.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00