Fixed panic on tag name length < 4
This commit is contained in:
parent
4b3edce02f
commit
0f6115b228
4
id3v2.go
4
id3v2.go
@ -212,14 +212,14 @@ func readID3v2Frames(r io.Reader, h *ID3v2Header) (map[string]interface{}, error
|
||||
}
|
||||
result[name] = txt
|
||||
|
||||
case name[0:4] == "APIC":
|
||||
case len(name) > 3 && name[0:4] == "APIC":
|
||||
p, err := readAPICFrame(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result[name] = p
|
||||
|
||||
case name[0:3] == "PIC":
|
||||
case len(name) > 2 && name[0:3] == "PIC":
|
||||
p, err := readPICFrame(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user