Skip to content

Commit 7bef0dc

Browse files
fix
1 parent 184fbd4 commit 7bef0dc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libc/fuzzing/__support/hashtable_fuzz.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ HashTable next_hashtable() {
144144
}
145145

146146
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
147-
char key[] = "key";
148147
global_status.buffer = reinterpret_cast<const char *>(data);
149148
global_status.remaining = size;
150149
HashTable table_a = next_hashtable();
@@ -164,8 +163,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
164163
break;
165164
}
166165
case Action::Tag::Insert: {
167-
ENTRY *a = table_a.insert(ENTRY{key, key});
168-
ENTRY *b = table_b.insert(ENTRY{key, key});
166+
ENTRY *a = table_a.insert(ENTRY{action->key.data(), action->key.data()});
167+
ENTRY *b = table_b.insert(ENTRY{action->key.data(), action->key.data()});
169168
if (a->data != b->data)
170169
__builtin_trap();
171170
break;

0 commit comments

Comments
 (0)