Fixing possible string overflow while using KALI_PROCESS_NAME

This commit is contained in:
zicodxx 2009-12-11 10:13:27 +00:00
parent 19806aa7ec
commit a87ae8a672
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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)