From a87ae8a6721f5cc28c0e44feacf85f02a77e32a8 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Fri, 11 Dec 2009 10:13:27 +0000 Subject: [PATCH] Fixing possible string overflow while using KALI_PROCESS_NAME --- CHANGELOG.txt | 4 ++++ arch/linux/ukali.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dc4c982cc..7e4a7896c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20091211 +-------- +arch/linux/ukali.c: Fixing possible string overflow while using KALI_PROCESS_NAME + 20091208 -------- main/gameseq.c, main/menu.c, main/menu.h, main/newdemo.c, main/newmenu.c, main/newmenu.h: Move newmenu_get_filename to menu.c, call it get_filename and have it use newmenu_listbox1; support long demo filenames diff --git a/arch/linux/ukali.c b/arch/linux/ukali.c index 5b2d7cb62..da08b7dab 100644 --- a/arch/linux/ukali.c +++ b/arch/linux/ukali.c @@ -237,7 +237,7 @@ int KaliOpenSocket(unsigned short port) { memcpy(&opendata[1], &port, sizeof(port)); pid = (int)htonl(getpid()); memcpy(&opendata[3], &pid, sizeof(pid)); - strncpy(&opendata[7], KALI_PROCESS_NAME, sizeof(KALI_PROCESS_NAME)); + strncpy(&opendata[7], KALI_PROCESS_NAME, sizeof(char)*8); opendata[15] = 0; if ((hand = knix_newSock()) < 0)