diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:48 +0000 |
commit | 93c1b73a09a52d4a265f683bf1954b08bb430049 (patch) | |
tree | 5543464d74945196cc890e9d9099e5d0660df7eb /test/fuzzer/AbsNegAndConstantTest.cpp | |
parent | 0d8e7490d6e8a13a8f0977d9b7771803b9f64ea0 (diff) |
Notes
Diffstat (limited to 'test/fuzzer/AbsNegAndConstantTest.cpp')
-rw-r--r-- | test/fuzzer/AbsNegAndConstantTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/fuzzer/AbsNegAndConstantTest.cpp b/test/fuzzer/AbsNegAndConstantTest.cpp index 049db0a60c3d..a3f534980010 100644 --- a/test/fuzzer/AbsNegAndConstantTest.cpp +++ b/test/fuzzer/AbsNegAndConstantTest.cpp @@ -14,7 +14,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { unsigned y; memcpy(&x, Data, sizeof(x)); memcpy(&y, Data + sizeof(x), sizeof(y)); - if (abs(x) < 0 && y == 0xbaddcafe) { + volatile int abs_x = abs(x); + if (abs_x < 0 && y == 0xbaddcafe) { printf("BINGO; Found the target, exiting; x = 0x%x y 0x%x\n", x, y); fflush(stdout); exit(1); |