From 4fb053b8e7eb949ac7fc69b786227ad399b1b898 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 5 Feb 2015 04:30:07 -0600 Subject: [PATCH] Fix incorrect strncpy in S_AL_StartBackgroundTrack Error is loop argument is NULL. Ensure that s_backgroundTrack is a null terminated string. --- code/client/snd_openal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c index 516368a9..d6498a98 100644 --- a/code/client/snd_openal.c +++ b/code/client/snd_openal.c @@ -2115,7 +2115,7 @@ void S_AL_StartBackgroundTrack( const char *intro, const char *loop ) issame = qfalse; // Copy the loop over - strncpy( s_backgroundLoop, loop, sizeof( s_backgroundLoop ) ); + Q_strncpyz( s_backgroundLoop, loop, sizeof( s_backgroundLoop ) ); if(!issame) {