boringssl/tool
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
..
args.cc Enable more warnings & treat warnings as errors on Windows. 2015-01-31 00:18:55 +00:00
client.cc Enable bssl client/s_client and server/s_server on Windows. 2015-01-28 20:24:09 +00:00
CMakeLists.txt Change CMakeLists.txt to two-space indent. 2015-01-28 16:37:10 -08:00
const.cc Inital import. 2014-06-20 13:17:32 -07:00
digest.cc Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
internal.h Enable more warnings & treat warnings as errors on Windows. 2015-01-31 00:18:55 +00:00
pkcs12.cc Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
server.cc Enable bssl client/s_client and server/s_server on Windows. 2015-01-28 20:24:09 +00:00
speed.cc Fix out-of-bounds memory write in speed.cc. 2015-03-17 19:12:54 +00:00
tool.cc Enable bssl client/s_client and server/s_server on Windows. 2015-01-28 20:24:09 +00:00
transport_common.cc Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
transport_common.h Enable bssl client/s_client and server/s_server on Windows. 2015-01-28 20:24:09 +00:00