]> Cypherpunks repositories - gostls13.git/commit
archive/tar: add missing error checks to Reader.Next
authorJoe Tsai <joetsai@digital-static.net>
Tue, 6 Oct 2015 08:04:18 +0000 (01:04 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 6 Oct 2015 17:13:11 +0000 (17:13 +0000)
commit281eabe46f638139b8d85d87a359880dc0f8ea81
treefd300be45a1d86069d25285e2812437d2d5ff01e
parent01ecd41688d0e2441cc8cb755f514807ef966821
archive/tar: add missing error checks to Reader.Next

A recursive call to Reader.Next did not check the error before
trying to use the result, leading to a nil pointer panic.
This specific CL addresses the immediate issue, which is the panic,
but does not solve the root issue, which is due to an integer
overflow in the base-256 parser.

Updates #12435

Change-Id: Ia908671f0f411a409a35e24f2ebf740d46734072
Reviewed-on: https://go-review.googlesource.com/15437
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/archive/tar/reader.go
src/archive/tar/reader_test.go
src/archive/tar/testdata/issue12435.tar [new file with mode: 0644]