diff options
author | Matt Morehouse <mascasa@google.com> | 2018-01-30 18:25:55 +0000 |
---|---|---|
committer | Matt Morehouse <mascasa@google.com> | 2018-01-30 18:25:55 +0000 |
commit | 1d8e5ea2500728cfc751ce055dd75e5084584e9c (patch) | |
tree | 25db7313f68a4dae300aceb8a956700f5297aa5a /compiler-rt | |
parent | 3a730d8582d8e93c432c953dbf6940aa127ce8bc (diff) | |
download | bcm5719-llvm-1d8e5ea2500728cfc751ce055dd75e5084584e9c.tar.gz bcm5719-llvm-1d8e5ea2500728cfc751ce055dd75e5084584e9c.zip |
[libFuzzer] Fix sizeof(ptr) bug.
sizeof(const char *) returns 4 or 8 when what we really want is the size
of the array.
llvm-svn: 323802
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerMutate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerMutate.cpp b/compiler-rt/lib/fuzzer/FuzzerMutate.cpp index 9ee5299f1b6..e0e4578524b 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMutate.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerMutate.cpp @@ -62,7 +62,7 @@ MutationDispatcher::MutationDispatcher(Random &Rand, static char RandCh(Random &Rand) { if (Rand.RandBool()) return Rand(256); - const char *Special = "!*'();:@&=+$,/?%#[]012Az-`~.\xff\x00"; + const char Special[] = "!*'();:@&=+$,/?%#[]012Az-`~.\xff\x00"; return Special[Rand(sizeof(Special) - 1)]; } |