From cf288cd46d71a1b9c098d7051d851e0a997fdf2e Mon Sep 17 00:00:00 2001 From: halleyscometsw Date: Sun, 15 Jun 2008 09:29:55 +0000 Subject: [PATCH] another sadb header check git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@241 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- src/meta/ngc_dsp_std.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/meta/ngc_dsp_std.c b/src/meta/ngc_dsp_std.c index 944dbd13..52e31a36 100644 --- a/src/meta/ngc_dsp_std.c +++ b/src/meta/ngc_dsp_std.c @@ -612,6 +612,9 @@ VGMSTREAM * init_vgmstream_sadb(STREAMFILE *streamFile) { if (read_dsp_header(&ch0_header, 0x80, streamFile)) goto fail; if (read_dsp_header(&ch1_header, 0xe0, streamFile)) goto fail; + /* check header magic */ + if (read_32bitBE(0x0,streamFile) != 0x73616462) goto fail; /* "sadb" */ + start_offset = read_32bitBE(0x48,streamFile); interleave = 16;