Go to file
Brian Smith d53b2c3c88 Fix out-of-bounds memory write in speed.cc.
Windows x64 uses the IL32P64 data model, which means that unsigned int
is 32 bits and size_t is 64 bits. Previously, the expression
|~(alignment - 1)| resulted in the 32-bit value 0xFFFFFFF0, which was
then extended to the 64-bit value 0x00000000FFFFFFF0 when promoted to
size_t. When the input pointer was masked with this value, the result
was a pointer that was usually way outside the boundaries of the array.

The new code casts |alignment| to size_t first prior to the bitwise
negation, resulting in the correct mask value of 0xFFFFFFFFFFFFFFF0.

Change-Id: I04754aa9e1ce7a615c2b4c74051cfcca38dbb52f
Reviewed-on: https://boringssl-review.googlesource.com/3961
Reviewed-by: Adam Langley <agl@google.com>
2015-03-17 19:12:54 +00:00
crypto Remove Unused SPARC & PowerPC perlasm scripts. 2015-03-14 00:16:55 +00:00
doc Inital import. 2014-06-20 13:17:32 -07:00
include/openssl Define more OPENSSL_NO_xxx flags in opensslfeatures.h. 2015-03-14 00:21:01 +00:00
ssl Process alerts between ChangeCipherSpec and Finished. 2015-03-13 20:19:11 +00:00
tool Fix out-of-bounds memory write in speed.cc. 2015-03-17 19:12:54 +00:00
util Generate error data at build time. 2015-03-06 18:59:25 +00:00
.clang-format Inital import. 2014-06-20 13:17:32 -07:00
.gitignore Add generated documentation to .gitignore 2015-01-26 18:37:55 +00:00
BUILDING Generate error data at build time. 2015-03-06 18:59:25 +00:00
CMakeLists.txt Generate error data at build time. 2015-03-06 18:59:25 +00:00
codereview.settings Add a codereview.settings file. 2014-11-18 22:21:33 +00:00
STYLE Style guide tweaks. 2015-02-19 18:33:20 +00:00