Skip to content

Commit

Permalink
Tag header size should always be synchsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
n10v committed Aug 15, 2018
1 parent 5da9331 commit 5785be9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion header.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ func parseHeader(rd io.Reader) (tagHeader, error) {

header.Version = data[3]

size, err := parseSize(data[6:], header.Version == 4)
// Tag header size is always synchsafe.
size, err := parseSize(data[6:], true)
if err != nil {
return header, err
}
Expand Down

0 comments on commit 5785be9

Please sign in to comment.