boringssl/crypto/bio
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
..
bio_mem.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
bio_test.cc Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
bio.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
buffer.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
CMakeLists.txt
connect.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
fd.c Wrap MSVC-only warning pragmas in a macro. 2016-06-09 21:29:36 +00:00
file.c Remove CP_UTF8 code for Windows filenames. 2016-02-22 17:19:33 +00:00
hexdump.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
internal.h Wrap MSVC-only warning pragmas in a macro. 2016-06-09 21:29:36 +00:00
pair.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
printf.c Fix all sign/unsigned warnings with Clang and GCC. 2015-10-27 22:48:00 +00:00
socket_helper.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
socket.c Place comment(lib, *) pragmas under OPENSSL_MSVC_PRAGMA. 2016-10-10 19:25:55 +00:00