Check if VFileOpen is actually passed a path before trying to open it
Jeffrey Pfau jeffrey@endrift.com
Sun, 19 Oct 2014 21:13:32 -0700
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/util/vfs.c
→
src/util/vfs.c
@@ -39,6 +39,9 @@
static const char* _vdeName(struct VDirEntry* vde); struct VFile* VFileOpen(const char* path, int flags) { + if (!path) { + return 0; + } int fd = open(path, flags, 0666); return VFileFromFD(fd); }