diff --git a/id3v2frames.go b/id3v2frames.go index 16083a7..6b842c3 100644 --- a/id3v2frames.go +++ b/id3v2frames.go @@ -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)