mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-20 18:52:31 +00:00
Use strlcpy() instead of strncpy().
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2823 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ad7802e43b
commit
948662ecfa
1 changed files with 3 additions and 1 deletions
|
@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "qtv.h"
|
||||
|
||||
#include "bsd_string.h"
|
||||
|
||||
#define ParseError(m) (m)->cursize = (m)->cursize+1 //
|
||||
|
||||
void SendBufferToViewer(viewer_t *v, const char *buffer, int length, qboolean reliable)
|
||||
|
@ -267,7 +269,7 @@ static void ParseStufftext(sv_t *tv, netmsg_t *m, int to, unsigned int mask)
|
|||
text[strlen(text)-1] = '\0';
|
||||
|
||||
//copy over the server's serverinfo
|
||||
strncpy(tv->serverinfo, text+16, sizeof(tv->serverinfo)-1);
|
||||
strlcpy(tv->serverinfo, text+16, sizeof(tv->serverinfo));
|
||||
|
||||
Info_ValueForKey(tv->serverinfo, "*qtv", value, sizeof(value));
|
||||
if (*value)
|
||||
|
|
Loading…
Reference in a new issue