openssl/crypto/asn1
Rich Salz b4faea50c3 Use safer sizeof variant in malloc
For a local variable:
        TYPE *p;
Allocations like this are "risky":
        p = OPENSSL_malloc(sizeof(TYPE));
if the type of p changes, and the malloc call isn't updated, you
could get memory corruption.  Instead do this:
        p = OPENSSL_malloc(sizeof(*p));
Also fixed a few memset() calls that I noticed while doing this.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-04 15:00:13 -04:00
..
a_bitstr.c free null cleanup finale 2015-05-01 10:02:07 -04:00
a_d2i_fp.c free NULL cleanup -- coda 2015-05-01 14:37:16 -04:00
a_digest.c remove malloc casts 2015-04-28 15:28:14 -04:00
a_dup.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
a_enum.c free null cleanup finale 2015-05-01 10:02:07 -04:00
a_gentm.c free null cleanup finale 2015-05-01 10:02:07 -04:00
a_i2d_fp.c remove malloc casts 2015-04-28 15:28:14 -04:00
a_int.c free null cleanup finale 2015-05-01 10:02:07 -04:00
a_mbstr.c free null cleanup finale 2015-05-01 10:02:07 -04:00
a_object.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
a_octet.c Remove old ASN.1 code. 2015-03-23 13:15:06 +00:00
a_print.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
a_sign.c free null cleanup finale 2015-05-01 10:02:07 -04:00
a_strex.c make X509_NAME opaque 2015-03-25 14:15:00 +00:00
a_strnid.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
a_time.c Dead code removal: #if 0 asn1, pkcs7 2015-01-30 15:35:49 -05:00
a_type.c Return an error in ASN1_TYPE_unpack_sequence if argument is NULL 2015-05-04 13:05:31 +01:00
a_utctm.c free null cleanup finale 2015-05-01 10:02:07 -04:00
a_utf8.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
a_verify.c free cleanup almost the finale 2015-04-30 17:57:32 -04:00
ameth_lib.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
asn1_err.c Remove combine option from ASN.1 code. 2015-03-26 22:04:15 +00:00
asn1_gen.c Add OSSL_NELEM macro. 2015-05-03 12:53:08 +01:00
asn1_lib.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
asn1_locl.h Make asn1_ex_i2c, asn1_ex_c2i static. 2015-03-28 12:08:48 +00:00
asn1_par.c free NULL cleanup 2015-03-24 07:52:24 -04:00
asn_mime.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
asn_moid.c make ASN1_OBJECT opaque 2015-03-24 17:35:58 +00:00
asn_mstbl.c free NULL cleanup 11 2015-05-01 10:15:18 -04:00
asn_pack.c free null cleanup finale 2015-05-01 10:02:07 -04:00
bio_asn1.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
bio_ndef.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
charmap.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
charmap.pl RT1815: More const'ness improvements 2014-08-18 11:49:16 -04:00
d2i_pr.c free NULL cleanup 2015-03-28 10:54:15 -04:00
d2i_pu.c free NULL cleanup 2015-03-28 10:54:15 -04:00
evp_asn1.c Remove old ASN.1 code from evp_asn1.c 2015-03-31 19:18:51 +01:00
f_enum.c Remove goto inside an if(0) block 2015-05-01 14:29:48 -04:00
f_int.c Remove goto inside an if(0) block 2015-05-01 14:29:48 -04:00
f_string.c Remove goto inside an if(0) block 2015-05-01 14:29:48 -04:00
i2d_pr.c Move some ASN.1 internals to asn1_int.h 2015-03-24 12:03:36 +00:00
i2d_pu.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
Makefile make depend 2015-04-03 18:31:15 +01:00
n_pkey.c remove malloc casts 2015-04-28 15:28:14 -04:00
nsseq.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
p5_pbe.c free NULL cleanup -- coda 2015-05-01 14:37:16 -04:00
p5_pbev2.c Remove duplicate code. 2015-03-30 22:01:31 +01:00
p8_pkey.c Check PKCS#8 pkey field is valid before cleansing. 2015-02-03 13:58:14 +00:00
t_bitst.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
t_crl.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
t_pkey.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
t_req.c make X509_EXTENSION opaque 2015-03-23 18:27:04 +00:00
t_spki.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
t_x509.c Remove goto inside an if(0) block 2015-05-01 14:29:48 -04:00
t_x509a.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
tasn_dec.c free null cleanup finale 2015-05-01 10:02:07 -04:00
tasn_enc.c Make asn1_ex_i2c, asn1_ex_c2i static. 2015-03-28 12:08:48 +00:00
tasn_fre.c Remove combine option from ASN.1 code. 2015-03-26 22:04:15 +00:00
tasn_new.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
tasn_prn.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
tasn_scn.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
tasn_typ.c Allocate string types directly. 2015-03-13 16:42:44 +00:00
tasn_utl.c free null cleanup finale 2015-05-01 10:02:07 -04:00
x_algor.c free NULL cleanup 8 2015-04-30 11:31:07 -04:00
x_bignum.c Fix format script. 2015-03-02 13:26:29 +00:00
x_crl.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
x_info.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
x_long.c Fix format script. 2015-03-02 13:26:29 +00:00
x_nx509.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
x_pkey.c Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
x_pubkey.c free null cleanup finale 2015-05-01 10:02:07 -04:00
x_req.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
x_sig.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
x_spki.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
x_val.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
x_x509.c free null cleanup finale 2015-05-01 10:02:07 -04:00
x_x509a.c free NULL cleanup 8 2015-04-30 11:31:07 -04:00