all repos — mgba @ 3a9c99370ee715e1bb0e603f8740a7900033a041

mGBA Game Boy Advance Emulator

Core: Fix null pointer deref if no file is found
Jeffrey Pfau jeffrey@endrift.com
Sat, 17 Sep 2016 12:41:54 -0700
commit

3a9c99370ee715e1bb0e603f8740a7900033a041

parent

805ef9efdded3507ff4e68b47d2857466729e686

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/core/library.csrc/core/library.c

@@ -41,6 +41,9 @@ struct mCore* core;

if (!vf) { vf = VFileOpen(filename, O_RDONLY); } + if (!vf) { + return; + } core = mCoreFindVF(vf); if (core) { core->init(core);