Skip to content

Commit

Permalink
flac_metadatablocks: type >= 127 is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Oct 13, 2021
1 parent 509b8f8 commit 984ba1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion format/flac/flac_metadatablocks.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package flac

// TODO: 24 bit picture length truncate warning
// TODO: Cuesheet

import (
"github.com/wader/fq/format"
Expand Down Expand Up @@ -110,7 +111,11 @@ func metadatablocskDecode(d *decode.D, in interface{}) interface{} {
}
})
default:
d.FieldBitBufLen("data", int64(length*8))
if typ < 127 {
d.FieldBitBufLen("data", int64(length*8))
} else {
d.Invalid("invalid block type")
}
}
})
}
Expand Down

0 comments on commit 984ba1a

Please sign in to comment.