boringssl/crypto/asn1
David Benjamin 17cf2cb1d2 Work around language and compiler bug in memcpy, etc.
Most C standard library functions are undefined if passed NULL, even
when the corresponding length is zero. This gives them (and, in turn,
all functions which call them) surprising behavior on empty arrays.
Some compilers will miscompile code due to this rule. See also
https://www.imperialviolet.org/2016/06/26/nonnull.html

Add OPENSSL_memcpy, etc., wrappers which avoid this problem.

BUG=23

Change-Id: I95f42b23e92945af0e681264fffaf578e7f8465e
Reviewed-on: https://boringssl-review.googlesource.com/12928
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2016-12-21 20:34:47 +00:00
..
a_bitstr.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
a_bool.c
a_d2i_fp.c
a_dup.c
a_enum.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
a_gentm.c Don't leak memory on ASN1_GENERALIZEDTIME_adj() error path 2016-11-10 16:17:29 +00:00
a_i2d_fp.c
a_int.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
a_mbstr.c
a_object.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
a_octet.c
a_print.c
a_strnid.c
a_time.c Delete d2i_ASN1_bytes and i2d_ASN1_bytes. 2016-08-16 19:45:13 +00:00
a_type.c
a_utctm.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
a_utf8.c
asn1_lib.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
asn1_locl.h
asn1_par.c
asn1_test.cc Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
asn_pack.c
charmap.pl
CMakeLists.txt Delete d2i_ASN1_bytes and i2d_ASN1_bytes. 2016-08-16 19:45:13 +00:00
f_enum.c Purge some a2i functions. 2016-08-16 19:38:31 +00:00
f_int.c Purge some a2i functions. 2016-08-16 19:38:31 +00:00
f_string.c Purge some a2i functions. 2016-08-16 19:38:31 +00:00
t_bitst.c
tasn_dec.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tasn_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tasn_fre.c
tasn_new.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tasn_typ.c Remove spurious ';' and fix indentation for macro arguments in one file 2016-08-03 21:41:01 +00:00
tasn_utl.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x_bignum.c
x_long.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00