From 120465d676afe4ef6dae8a0c48fb7af359a7067f Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Fri, 24 Jan 2025 19:37:28 +0100 Subject: [PATCH] Fix runahead.c --- runahead.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runahead.c b/runahead.c index 0f26be6632..473320cd62 100644 --- a/runahead.c +++ b/runahead.c @@ -150,7 +150,7 @@ static void strcat_alloc(char **dst, const char *s) { size_t __len = strlen(s); if (__len != 0) - src = strldup(s, __len); + src = strldup(s, __len + 1); else src = NULL; } @@ -239,7 +239,7 @@ static char *get_tmpdir_alloc(const char *override_dir) { size_t _len = strlen(src); if (_len != 0) - path = strldup(src, _len); + path = strldup(src, _len + 1); } else path = (char*)calloc(1,1); @@ -264,7 +264,7 @@ static bool write_file_with_random_name(char **temp_dll_path, { size_t _len = strlen(src); if (_len != 0) - ext = strldup(src, _len); + ext = strldup(src, _len + 1); } else ext = (char*)calloc(1,1);