Fix possible missing NUL at end of string

There are were a few uses of 'strncpy' that could lead to a missing NUL,
resulting in possible garbage being displayed. As suggested by Tamas,
use 'wstrlcpy' instead
This commit is contained in:
Christophe CURIS
2011-08-08 19:11:22 +02:00
committed by Carlos R. Mafra
parent e499f31a4e
commit e01d14abe4
5 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -2005,7 +2005,7 @@ static int getKeybind(WScreen * scr, WDefaultEntry * entry, WMPropList * value,
return True;
}
strncpy(buf, val, MAX_SHORTCUT_LENGTH);
wstrlcpy(buf, val, MAX_SHORTCUT_LENGTH);
b = (char *)buf;