1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Andree Buschmann 2010-01-31 11:43:42 +00:00
parent 4c96bb54c6
commit db4d7a313e
2 changed files with 12 additions and 8 deletions

View file

@ -223,15 +223,17 @@ mpc_streaminfo_read(mpc_streaminfo * si, mpc_reader * r)
#endif
si->stream_version = HeaderData[0] >> 24;
// stream version 8
if ((si->stream_version & 15) >= 8) {
return ERROR_CODE_INVALIDSV;
}
// stream version 7
else if ((si->stream_version & 15) == 7) {
if ((si->stream_version & 15) == 7) {
Error = streaminfo_read_header_sv7(si, HeaderData);
if (Error != ERROR_CODE_OK) return Error;
} else {
// only sv7 allowed with "MP+" signature
return ERROR_CODE_INVALIDSV;
}
} else if (memcmp(HeaderData, "MPCK", 4) == 0) {
// stream version 8 uses "MPCK" signature
return ERROR_CODE_INVALIDSV;
} else {
#ifdef MPC_SUPPORT_SV456
#ifndef MPC_LITTLE_ENDIAN