Created
April 17, 2023 17:06
-
-
Save thoughtpolice/d52c84ca67c24f53fe034e82f2f9b07a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stddef.h> | |
char get_first_cap(const char *in, int size) { | |
const char *first_cap = NULL; | |
if (size == 0) | |
return ' '; | |
for (int i = 0 ; i++ < size && *in != 0; in++) { | |
if (*in >= 'A' && *in <= 'Z') { | |
first_cap = in; | |
break; | |
} | |
} | |
if (first_cap) | |
return *first_cap; | |
return ' '; | |
} | |
int LLVMFuzzerTestOneInput(const char *Data, long long Size) { | |
get_first_cap(Data, Size); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment