From 3a9c99370ee715e1bb0e603f8740a7900033a041 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 17 Sep 2016 12:41:54 -0700 Subject: [PATCH] Core: Fix null pointer deref if no file is found --- src/core/library.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/library.c b/src/core/library.c index 817527067..995772cf9 100644 --- a/src/core/library.c +++ b/src/core/library.c @@ -41,6 +41,9 @@ void mLibraryAddEntry(struct mLibrary* library, const char* filename, struct VFi if (!vf) { vf = VFileOpen(filename, O_RDONLY); } + if (!vf) { + return; + } core = mCoreFindVF(vf); if (core) { core->init(core);