forked from mirrors/tar-split
archive/tar: properly parse GNU base-256 encoding
Motivation: * Previous implementation did not detect integer overflow when parsing a base-256 encoded field. * Previous implementation did not treat the integer as a two's complement value as specified by GNU. The relevant GNU specification says: <<< GNU format uses two's-complement base-256 notation to store values that do not fit into standard ustar range. >>> Fixes #12435 Change-Id: I4639bcffac8d12e1cb040b76bd05c9d7bc6c23a8 Reviewed-on: https://go-review.googlesource.com/17424 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
ce5aac17f9
commit
a04b4ddba4
3 changed files with 102 additions and 8 deletions
BIN
archive/tar/testdata/issue12435.tar
vendored
Normal file
BIN
archive/tar/testdata/issue12435.tar
vendored
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue