From de09ac5dade2bf11fd540200051ea90414e3aec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 19 Jun 2019 21:11:07 +0200 Subject: [PATCH] WPrefs.c Removed format-overflow warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds some characters to the mbuf buffer, to allow the buffer size and some extra characters. WPrefs.c: In function ‘loadConfigurations’: ../src/wconfig.h:400:17: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1018 [-Wformat-overflow=] Signed-off-by: Rodolfo García Peñas (kix) --- WPrefs.app/WPrefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c index af28a27d..0913e24c 100644 --- a/WPrefs.app/WPrefs.c +++ b/WPrefs.app/WPrefs.c @@ -602,7 +602,7 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw) char *path; FILE *file; char buffer[1024]; - char mbuf[1024]; + char mbuf[1069]; /* Size of buffer and extra characters for the sprintfs */ int v1, v2, v3; path = wdefaultspathfordomain("WindowMaker");