1
1
mirror of https://github.com/wader/fq.git synced 2024-11-24 03:05:22 +03:00

Merge pull request #93 from wader/id3v2-assert-magic

id3v2: Should assert not validate magic
This commit is contained in:
Mattias Wadman 2022-01-22 16:22:21 +01:00 committed by GitHub
commit b700194ac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {