From: havoc Date: Sun, 23 Sep 2007 10:12:09 +0000 (+0000) Subject: replace strcpy use with strlcpy in some commented out code in menu X-Git-Tag: xonotic-v0.1.0preview~2899 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=499e5c85ba52b5d258e4d5ea66439381be719efc;p=xonotic%2Fdarkplaces.git replace strcpy use with strlcpy in some commented out code in menu git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7576 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/menu.c b/menu.c index 3950381f..1b0a0b2b 100644 --- a/menu.c +++ b/menu.c @@ -2474,8 +2474,8 @@ static void M_AddBindToCategory(bindcategory_t *c, char *command, char *descript *b = Z_Alloc(sizeof(binditem_t) + strlen(command) + 1 + strlen(description) + 1); *b->command = (char *)((*b) + 1); *b->description = *b->command + strlen(command) + 1; - strcpy(*b->command, command); - strcpy(*b->description, description); + strlcpy(*b->command, command, strlen(command) + 1); + strlcpy(*b->description, description, strlen(description) + 1); } static void M_AddBind (char *category, char *command, char *description)