fix bug with invalid APIC mimetype
Return an error if the mimetype can't be decoded rather than panicking. See #28.
This commit is contained in:
parent
e24fc33f60
commit
22a6715536
@ -597,6 +597,9 @@ func readAPICFrame(b []byte) (*Picture, error) {
|
||||
mimeType := string(mimeDataSplit[0])
|
||||
|
||||
b = mimeDataSplit[1]
|
||||
if len(b) < 1 {
|
||||
return nil, fmt.Errorf("error decoding APIC mimetype")
|
||||
}
|
||||
picType := b[0]
|
||||
|
||||
descDataSplit, err := dataSplit(b[1:], enc)
|
||||
|
Loading…
Reference in New Issue
Block a user