aboutsummaryrefslogtreecommitdiff
path: root/lib/Fuzzer/FuzzerDictionary.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fuzzer/FuzzerDictionary.h')
-rw-r--r--lib/Fuzzer/FuzzerDictionary.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Fuzzer/FuzzerDictionary.h b/lib/Fuzzer/FuzzerDictionary.h
index eba0eabb6838..84cee87b8971 100644
--- a/lib/Fuzzer/FuzzerDictionary.h
+++ b/lib/Fuzzer/FuzzerDictionary.h
@@ -20,8 +20,9 @@
namespace fuzzer {
// A simple POD sized array of bytes.
-template <size_t kMaxSize> class FixedWord {
+template <size_t kMaxSizeT> class FixedWord {
public:
+ static const size_t kMaxSize = kMaxSizeT;
FixedWord() {}
FixedWord(const uint8_t *B, uint8_t S) { Set(B, S); }
@@ -32,10 +33,12 @@ public:
}
bool operator==(const FixedWord<kMaxSize> &w) const {
+ ScopedDoingMyOwnMemOrStr scoped_doing_my_own_mem_os_str;
return Size == w.Size && 0 == memcmp(Data, w.Data, Size);
}
bool operator<(const FixedWord<kMaxSize> &w) const {
+ ScopedDoingMyOwnMemOrStr scoped_doing_my_own_mem_os_str;
if (Size != w.Size)
return Size < w.Size;
return memcmp(Data, w.Data, Size) < 0;
@@ -50,7 +53,7 @@ private:
uint8_t Data[kMaxSize];
};
-typedef FixedWord<27> Word; // 28 bytes.
+typedef FixedWord<64> Word;
class DictionaryEntry {
public: