summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-01-31 11:43:42 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-01-31 11:43:42 +0000
commitdb4d7a313e10d085218a95f9176b12287a300d7c (patch)
tree755ba6a2ae831cee6652ff8e922de1b8bf492a3c /apps/codecs
parent4c96bb54c60e10b190f2421a3bcb69a96381fce9 (diff)
downloadrockbox-db4d7a313e10d085218a95f9176b12287a300d7c.tar.gz
rockbox-db4d7a313e10d085218a95f9176b12287a300d7c.zip
1st part of fix for FS#10637. Correction of mpc header parsing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24408 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/libmusepack/streaminfo.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/codecs/libmusepack/streaminfo.c b/apps/codecs/libmusepack/streaminfo.c
index d9c925dbfb..3edf50a5ea 100644
--- a/apps/codecs/libmusepack/streaminfo.c
+++ b/apps/codecs/libmusepack/streaminfo.c
@@ -223,15 +223,17 @@ mpc_streaminfo_read(mpc_streaminfo * si, mpc_reader * r)
223#endif 223#endif
224 si->stream_version = HeaderData[0] >> 24; 224 si->stream_version = HeaderData[0] >> 24;
225 225
226 // stream version 8
227 if ((si->stream_version & 15) >= 8) {
228 return ERROR_CODE_INVALIDSV;
229 }
230 // stream version 7 226 // stream version 7
231 else if ((si->stream_version & 15) == 7) { 227 if ((si->stream_version & 15) == 7) {
232 Error = streaminfo_read_header_sv7(si, HeaderData); 228 Error = streaminfo_read_header_sv7(si, HeaderData);
233 if (Error != ERROR_CODE_OK) return Error; 229 if (Error != ERROR_CODE_OK) return Error;
230 } else {
231 // only sv7 allowed with "MP+" signature
232 return ERROR_CODE_INVALIDSV;
234 } 233 }
234 } else if (memcmp(HeaderData, "MPCK", 4) == 0) {
235 // stream version 8 uses "MPCK" signature
236 return ERROR_CODE_INVALIDSV;
235 } else { 237 } else {
236#ifdef MPC_SUPPORT_SV456 238#ifdef MPC_SUPPORT_SV456
237#ifndef MPC_LITTLE_ENDIAN 239#ifndef MPC_LITTLE_ENDIAN