[iortcw] 192/497: All: Fix incorrect strncat usage in CL_ServerInfoPacket
Simon McVittie
smcv at debian.org
Wed Sep 21 19:48:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.42d
in repository iortcw.
commit 0d4de9d8f73ac09e0454b252b54fecfe9d3637b5
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date: Fri Aug 29 16:13:56 2014 +0000
All: Fix incorrect strncat usage in CL_ServerInfoPacket
---
MP/code/client/cl_main.c | 2 +-
SP/code/client/cl_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MP/code/client/cl_main.c b/MP/code/client/cl_main.c
index 2150940..2cb300f 100644
--- a/MP/code/client/cl_main.c
+++ b/MP/code/client/cl_main.c
@@ -4516,7 +4516,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) - 1);
+ Q_strcat(info, sizeof(info), "\n");
}
Com_Printf( "%s: %s", NET_AdrToStringwPort( from ), info );
}
diff --git a/SP/code/client/cl_main.c b/SP/code/client/cl_main.c
index 164aff7..3a5374e 100644
--- a/SP/code/client/cl_main.c
+++ b/SP/code/client/cl_main.c
@@ -4123,7 +4123,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) - 1);
+ Q_strcat( info, sizeof(info), "\n" );
}
Com_Printf( "%s: %s", NET_AdrToStringwPort( from ), info );
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list