From 9d9b160aea8abf40cee3d131d21bbad87d0c4ec6 Mon Sep 17 00:00:00 2001 From: tma Date: Tue, 28 Nov 2006 14:03:27 +0000 Subject: * Merge 954:955 from 1.34 branch git-svn-id: svn://svn.icculus.org/quake3/trunk@985 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_main.c | 2 +- code/client/qal.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'code/client') diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 8739fd1..598f3be 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -2869,7 +2869,7 @@ void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) { Q_strncpyz( info, MSG_ReadString( msg ), MAX_INFO_STRING ); if (strlen(info)) { if (info[strlen(info)-1] != '\n') { - strncat(info, "\n", sizeof(info)); + strncat(info, "\n", sizeof(info) - 1); } Com_Printf( "%s: %s", NET_AdrToString( from ), info ); } diff --git a/code/client/qal.c b/code/client/qal.c index 0701c5d..cfef944 100644 --- a/code/client/qal.c +++ b/code/client/qal.c @@ -176,8 +176,8 @@ qboolean QAL_Init(const char *libname) #else char fn[1024]; getcwd(fn, sizeof(fn)); - strncat(fn, "/", sizeof(fn)); - strncat(fn, libname, sizeof(fn)); + strncat(fn, "/", sizeof(fn) - strlen(fn) - 1); + strncat(fn, libname, sizeof(fn) - strlen(fn) - 1); if( (OpenALLib = OBJLOAD(fn)) == 0 ) { -- cgit v1.2.3