From 4fb0d1e56f83ac7d5edd06b6d5a2e8019bbddf37 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 6 Aug 2017 12:00:32 +0200 Subject: JANITORIAL: Increase buffer size to fix potential overflow Caught by GCC 7 (though the warning seemed misleading to me). Since SoundDesc->name can potentially be 14 characters "%s_reg%03d.fla" can be 25 characters, plus the terminating \0. --- engines/scumm/imuse_digi/dimuse_sndmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/scumm') diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp index b2ff3aadbb..618d7098a8 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -662,7 +662,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte } else if ((soundDesc->bundle) && (soundDesc->compressed)) { *buf = (byte *)malloc(size); assert(*buf); - char fileName[24]; + char fileName[26]; int offsetMs = (((offset * 8 * 10) / soundDesc->bits) / (soundDesc->channels * soundDesc->freq)) * 100; sprintf(fileName, "%s_reg%03d", soundDesc->name, region); if (scumm_stricmp(fileName, soundDesc->lastFileName) != 0) { -- cgit v1.2.3