57 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
58 #include <SDL_rwops.h>
69 SDL_RWops *retval =
nullptr;
73 reportAlways(
"VirtFs::rwops_seek: create rwops error: %s",
78 retval = SDL_AllocRW();
79 if (retval !=
nullptr)
82 retval->size = file->
funcs->rwops_size;
89 retval->hidden.unknown.data1 = file;
97 static bool checkFilePath(
const std::string &
restrict fname)
111 if (!checkFilePath(fname))
115 if (Fuzzer::conditionTerminate(fname))
135 if (!checkFilePath(fname))
146 if (!checkFilePath(fname))
#define reportAlways(...)
File * openRead(std::string filename)
SDL_RWops * create_rwops(File *const file, const std::string &fname)
SDL_RWops * rwopsOpenWrite(const std::string &fname)
bool isDirectory(std::string name)
SDL_RWops * rwopsOpenRead(const std::string &fname)
File * openWrite(std::string filename)
SDL_RWops * rwopsOpenAppend(const std::string &fname)
File * openAppend(std::string filename)
bool exists(std::string name)
#define BLOCK_START(name)
int(* seek)(File *const file, const uint64_t pos)
int(* rwops_write)(SDL_RWops *const rw, const void *const ptr, const int size, const int num)
int32_t(* rwops_seek)(SDL_RWops *const rw, const int32_t offset, const int whence)
int(* rwops_read)(SDL_RWops *const rw, void *const ptr, const int size, const int maxnum)
int(* rwops_close)(SDL_RWops *const rw)