mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[libFuzzer tests] Use substring comparison in libFuzzer tests
LIT launches executables with absolute, and not relative, path. strncmp would try to do exact comparison and fail. Differential Revision: https://reviews.llvm.org/D36242 llvm-svn: 309889
This commit is contained in:
parent
e87eb175b2
commit
af8c691e9b
@ -20,7 +20,7 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) {
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
if (Size == strlen(argv0) &&
|
||||
!strncmp(reinterpret_cast<const char *>(Data), argv0, Size)) {
|
||||
!strnstr(reinterpret_cast<const char *>(Data), argv0, Size)) {
|
||||
fprintf(stderr, "BINGO %s\n", argv0);
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user