From 1bac33b0dab06dc75de40ad45dbdd1ce121ca01f Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 28 Feb 2025 16:50:43 +0100 Subject: [PATCH] xkb: ddxLoad: don't crash the server when strcpy() fails No need for RunXkbComp() to hard-crash (by calling XNFstrdup()) the server if strdup() fails to allocate more memory - it's callers already handling the situation gracefully. Signed-off-by: Enrico Weigelt, metux IT consult --- xkb/ddxLoad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 6e9f0a1a8..8c0ec32e0 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -194,7 +194,7 @@ RunXkbComp(xkbcomp_buffer_callback callback, void *userdata) #ifdef WIN32 unlink(tmpname); #endif - return XNFstrdup(keymap); + return strdup(keymap); } else { LogMessage(X_ERROR, "Error compiling keymap (%s) executing '%s'\n",