From e443fd3a77f8c138b458fb8759dc0747703541ac Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Fri, 1 May 2015 15:55:37 +0200 Subject: [PATCH] Fix a format string vulnerability if MALLOC_LOG is set. --- misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc.c b/misc.c index 37c0207e..0e1d622d 100644 --- a/misc.c +++ b/misc.c @@ -755,7 +755,7 @@ void *safemalloc(size_t n, size_t size) #else strcpy(str, "Out of memory!"); #endif - modalfatalbox(str); + modalfatalbox("%s", str); } #ifdef MALLOC_LOG if (fp) @@ -797,7 +797,7 @@ void *saferealloc(void *ptr, size_t n, size_t size) #else strcpy(str, "Out of memory!"); #endif - modalfatalbox(str); + modalfatalbox("%s", str); } #ifdef MALLOC_LOG if (fp) -- 2.45.2