xref: /aosp_15_r20/tools/security/fuzzing/presubmit_test_fuzzers/test_code.cpp (revision d9ecfb0f4d734c9ce41cde8ac4d585b094fd4222)
1 #include <string.h>
2 #include <stdlib.h>
3 
BuggyCode1(const char * data)4 void BuggyCode1(const char *data) {
5   if (strcmp(data, "Hi!") == 0) {
6     abort();  // Boom!
7   }
8 }
9 
BuggyCode2(const char * data)10 void BuggyCode2(const char *data) {
11   if (strcmp(data, "Hey") == 0) {
12     abort();  // Boom!
13   }
14 }