Genre tags: read multi-value frames correctly, and repair existing rows #120
@@ -141,10 +141,10 @@ func findGenreFrame(body []byte, major byte) ([]string, error) {
|
||||
// the reverse) yields a plausible-looking wrong offset rather than an obvious
|
||||
// error, which is exactly how frame-walking bugs go unnoticed.
|
||||
func frameSize(b []byte, major byte) int {
|
||||
switch {
|
||||
case major == 2:
|
||||
switch major {
|
||||
case 2:
|
||||
return int(b[0])<<16 | int(b[1])<<8 | int(b[2])
|
||||
case major == 3:
|
||||
case 3:
|
||||
n := binary.BigEndian.Uint32(b)
|
||||
if n > maxID3TagSize {
|
||||
return -1
|
||||
|
||||
Reference in New Issue
Block a user