summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
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 d9c925d..3edf50a 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)
#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