From d97f1ed79e8b7503c0d06b8248c4b650b79b7fb6 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 8 Apr 2019 06:28:31 +0000 Subject: [PATCH] SW: Fix -Wformat-overflow and -Wstringop-overflow git-svn-id: https://svn.eduke32.com/eduke32@7534 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/sw/src/jnstub.cpp | 2 +- source/sw/src/sounds.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/sw/src/jnstub.cpp b/source/sw/src/jnstub.cpp index 198fd1085..e96c3bdec 100644 --- a/source/sw/src/jnstub.cpp +++ b/source/sw/src/jnstub.cpp @@ -2282,7 +2282,7 @@ ExtGetSpriteCaption(short spritenum) { SPRITEp sp = &sprite[spritenum]; const char *p = ""; - char name[64]; + char name[66]; char tp[30]; char multi_str[30] = ""; int16_t data; diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 8bc54ee76..9a5e2b4c9 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -469,7 +469,7 @@ PlaySong(char *song_file_name, int cdaudio_track, SWBOOL loop, SWBOOL restart) for (i = 0; i < ARRAY_SIZE(tracktypes); ++i) { waveformtrack[tracknamebaselen] = '\0'; - Bstrncat(waveformtrack, tracktypes[i], MAXWAVEFORMTRACKLENGTH); + Bstrncat(waveformtrack, tracktypes[i], MAXWAVEFORMTRACKLENGTH - 1); if (LoadSong(waveformtrack)) {