From 4406578522f991e7f1edcc54a38aa788993edec7 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 3 Apr 2014 08:46:47 -0500 Subject: [PATCH] Fixed: DSMF loader wrote outside filename array's bounds --- dumb/src/it/readdsmf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumb/src/it/readdsmf.c b/dumb/src/it/readdsmf.c index 5db09a75cc..be545a678c 100644 --- a/dumb/src/it/readdsmf.c +++ b/dumb/src/it/readdsmf.c @@ -31,8 +31,8 @@ static int it_riff_dsmf_process_sample( IT_SAMPLE * sample, const unsigned char int flags; memcpy( sample->filename, data, 13 ); - sample->filename[ 14 ] = 0; - + sample->filename[ 13 ] = 0; + flags = data[ 13 ] | ( data[ 14 ] << 8 ); sample->default_volume = data[ 15 ]; sample->length = data[ 16 ] | ( data[ 17 ] << 8 ) | ( data[ 18 ] << 16 ) | ( data[ 19 ] << 24 );