]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mem.c
Removed all calls to strcpy; most of them are now calls to strlcpy or memcpy.
[xonotic/darkplaces.git] / snd_mem.c
index 777dd6c6652b3c9769c4d99d1d374ba4601fc98c..15e571b37c1a368b185ff034a755b4df453ca86f 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -331,7 +331,7 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain)
                if (S_LoadWavFile (namebuffer, sfx))
                        return true;
                if (len >= 4 && !strcasecmp (namebuffer + len - 4, ".wav"))
-                       strcpy (namebuffer + len - 3, "ogg");
+                       memcpy (namebuffer + len - 3, "ogg", 4);
                if (OGG_LoadVorbisFile (namebuffer, sfx))
                        return true;
        }
@@ -347,7 +347,7 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain)
        if (S_LoadWavFile (namebuffer, sfx))
                return true;
        if (len >= 4 && !strcasecmp (namebuffer + len - 4, ".wav"))
-               strcpy (namebuffer + len - 3, "ogg");
+               memcpy (namebuffer + len - 3, "ogg", 4);
        if (OGG_LoadVorbisFile (namebuffer, sfx))
                return true;