From 16e7219456a1cb62f597429a48d97f82822f813e Mon Sep 17 00:00:00 2001 From: Alcaro Date: Sat, 21 Apr 2018 11:21:32 +0200 Subject: [PATCH] this segfault isn't really needed either. --- flips.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/flips.cpp b/flips.cpp index c40cea7..ea902e1 100644 --- a/flips.cpp +++ b/flips.cpp @@ -110,6 +110,7 @@ public: { size_t len = f->len(); uint8_t* ptr = (uint8_t*)malloc(len); + if (!ptr) return NULL; if (!f->read(ptr, 0, len)) { free(ptr); return NULL; } return new filemap_fallback(f, len, ptr); }