mirror of
https://github.com/wader/fq.git
synced 2024-12-24 13:52:02 +03:00
id3v2: Should assert not validate magic
Fixes issue with mp3 frame that happens to have a 2,3 or 4 at byte 3 being seen as id3v2 header
This commit is contained in:
parent
49c90f89b2
commit
85371173b5
@ -577,7 +577,7 @@ func decodeFrames(d *decode.D, version int, size uint64) {
|
||||
|
||||
func id3v2Decode(d *decode.D, in interface{}) interface{} {
|
||||
d.AssertAtLeastBitsLeft(4 * 8)
|
||||
d.FieldUTF8("magic", 3, d.ValidateStr("ID3"))
|
||||
d.FieldUTF8("magic", 3, d.AssertStr("ID3"))
|
||||
version := int(d.FieldU8("version"))
|
||||
versionValid := version == 2 || version == 3 || version == 4
|
||||
if !versionValid {
|
||||
|
Loading…
Reference in New Issue
Block a user