]> Cypherpunks repositories - gostls13.git/commit
archive/tar: handle integer overflow on 32bit machines
authorJoe Tsai <joetsai@digital-static.net>
Sat, 3 Sep 2016 04:03:57 +0000 (21:03 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Wed, 12 Oct 2016 16:36:41 +0000 (16:36 +0000)
commit14204662c8a73ea6d5b6489b0c5a6b0345b99a0d
tree17566cb680491b21b2c6e3e1c9ae1954a6646cb5
parent94f49fd40dd907bcf9e16ab9a798409b8fcc13fd
archive/tar: handle integer overflow on 32bit machines

Most calls to strconv.ParseInt(x, 10, 0) should really be
calls to strconv.ParseInt(x, 10, 64) in order to ensure that they
do not overflow on 32b architectures.

Furthermore, we should document a bug where Uid and Gid may
overflow on 32b machines since the type is declared as int.

Change-Id: I99c0670b3c2922e4a9806822d9ad37e1a364b2b8
Reviewed-on: https://go-review.googlesource.com/28472
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/archive/tar/common.go
src/archive/tar/reader.go