diff options
| author | MarcoFalke <[email protected]> | 2018-10-07 23:34:45 -0300 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-10-07 23:34:50 -0300 |
| commit | 2a747337ae16849ca1c8db0cbd1002b9ca42f1b1 (patch) | |
| tree | d4bc050cf80aa8dbec8ea5c70e7e2b49c07fb036 /src/bench | |
| parent | Merge #14421: Fix path to doc/descriptors.md in 0.17 release notes (diff) | |
| parent | Don't access out of bounds array entry array[sizeof(array)] (diff) | |
| download | discoin-2a747337ae16849ca1c8db0cbd1002b9ca42f1b1.tar.xz discoin-2a747337ae16849ca1c8db0cbd1002b9ca42f1b1.zip | |
Merge #14398: tests: Don't access out of bounds array index: array[sizeof(array)]
b09c81454e Don't access out of bounds array entry array[sizeof(array)] (Ben Woosley)
Pull request description:
Split from #13525
Tree-SHA512: bf44609fc5d497cd1894b85dce33a55977b3e0f3d03b986333a85967c1f3aa89089461f830939072bbb4d2477ccce26b9caeb627215bfb86a331f58d3466a4bd
Diffstat (limited to 'src/bench')
| -rw-r--r-- | src/bench/checkblock.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bench/checkblock.cpp b/src/bench/checkblock.cpp index 6f03581c4..e325333c0 100644 --- a/src/bench/checkblock.cpp +++ b/src/bench/checkblock.cpp @@ -20,7 +20,7 @@ namespace block_bench { static void DeserializeBlockTest(benchmark::State& state) { CDataStream stream((const char*)block_bench::block413567, - (const char*)&block_bench::block413567[sizeof(block_bench::block413567)], + (const char*)block_bench::block413567 + sizeof(block_bench::block413567), SER_NETWORK, PROTOCOL_VERSION); char a = '\0'; stream.write(&a, 1); // Prevent compaction @@ -36,7 +36,7 @@ static void DeserializeBlockTest(benchmark::State& state) static void DeserializeAndCheckBlockTest(benchmark::State& state) { CDataStream stream((const char*)block_bench::block413567, - (const char*)&block_bench::block413567[sizeof(block_bench::block413567)], + (const char*)block_bench::block413567 + sizeof(block_bench::block413567), SER_NETWORK, PROTOCOL_VERSION); char a = '\0'; stream.write(&a, 1); // Prevent compaction |