summaryrefslogtreecommitdiff
path: root/src/utils/physfsrwops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/physfsrwops.cpp')
-rw-r--r--src/utils/physfsrwops.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/utils/physfsrwops.cpp b/src/utils/physfsrwops.cpp
index 8216e3794..31b86058c 100644
--- a/src/utils/physfsrwops.cpp
+++ b/src/utils/physfsrwops.cpp
@@ -24,7 +24,9 @@
#include "utils/physfsrwops.h"
-#include <stdio.h> /* used for SEEK_SET, SEEK_CUR, SEEK_END ... */
+#include "utils/fuzzer.h"
+
+#include <stdio.h>
#include "debug.h"
@@ -215,6 +217,10 @@ SDL_RWops *PHYSFSRWOPS_openRead(const char *const fname)
if (!checkFilePath(fname))
return nullptr;
#endif
+#ifdef USE_FUZZER
+ if (Fuzzer::conditionTerminate(fname))
+ return nullptr;
+#endif
return create_rwops(PhysFs::openRead(fname));
} /* PHYSFSRWOPS_openRead */