From c1fbccfc066e425cd28e9a0a6e9a1495abfbe9e3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 11 Feb 2016 18:57:27 +0100 Subject: [PATCH] Don't try to open IPS/UPS/BPS patches if they don't exist --- patch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/patch.c b/patch.c index 37b882b87a..4fd1ab9892 100644 --- a/patch.c +++ b/patch.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "patch.h" @@ -499,6 +500,8 @@ static bool apply_patch_content(uint8_t **buf, ssize_t ret_size = *size; uint8_t *ret_buf = *buf; + if (!path_is_valid(patch_path)) + return false; if (!retro_read_file(patch_path, &patch_data, &patch_size)) return false; if (patch_size < 0)