From: havoc Date: Mon, 23 Jun 2008 12:48:56 +0000 (+0000) Subject: patch from Blub\0 to fix InfoString_SetValue (my dpsnprintf size was X-Git-Tag: xonotic-v0.1.0preview~2203 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a13f905c52c541aa70e98d500b566c76a8e10d82;p=xonotic%2Fdarkplaces.git patch from Blub\0 to fix InfoString_SetValue (my dpsnprintf size was wrong) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8371 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/common.c b/common.c index 499dccfd..c9248464 100644 --- a/common.c +++ b/common.c @@ -2030,7 +2030,7 @@ void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, con // set the key/value and append the remaining text char tempbuffer[4096]; strlcpy(tempbuffer, buffer + pos2, sizeof(tempbuffer)); - dpsnprintf(buffer + pos, sizeof(buffer) - pos, "\\%s\\%s%s", key, value, tempbuffer); + dpsnprintf(buffer + pos, bufferlength - pos, "\\%s\\%s%s", key, value, tempbuffer); } else {