• Joe Tsai's avatar
    archive/tar: properly parse GNU base-256 encoding · 5ebb374f
    Joe Tsai authored
    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/17424Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    5ebb374f
Name
Last commit
Last update
..
testdata Loading commit data...
common.go Loading commit data...
example_test.go Loading commit data...
reader.go Loading commit data...
reader_test.go Loading commit data...
stat_atim.go Loading commit data...
stat_atimespec.go Loading commit data...
stat_unix.go Loading commit data...
tar_test.go Loading commit data...
writer.go Loading commit data...
writer_test.go Loading commit data...