Skip to content

Commit

Permalink
flac_metadatablocks: typ > 127 can't happen, add app id
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Oct 23, 2021
1 parent 4d94c9a commit c1d9b4d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions format/flac/flac_metadatablocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,11 @@ func metadatablocskDecode(d *decode.D, in interface{}) interface{} {
})
}
})
case MetadataBlockApplication:
d.FieldUTF8("id", 4)
d.FieldBitBufLen("data", int64((length-4)*8))
default:
if typ < 127 {
d.FieldBitBufLen("data", int64(length*8))
} else {
d.Invalid("invalid block type")
}
d.FieldBitBufLen("data", int64(length*8))
}
})
}
Expand Down

0 comments on commit c1d9b4d

Please sign in to comment.