From 5785be9ad4520277483e10d919bc41d2c040bc8e Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Wed, 15 Aug 2018 16:33:37 +0500 Subject: [PATCH] Tag header size should always be synchsafe --- header.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/header.go b/header.go index ebef654..2a9a34e 100644 --- a/header.go +++ b/header.go @@ -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 }