diff options
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/libmusepack/streaminfo.c | 12 |
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 |