1
0
mirror of https://github.com/golang/go synced 2024-11-06 05:26:11 -07:00
go/cmd/stringer/testdata
Nick Craig-Wood 578c521fc2 cmd/stringer: fix panic caused by integer overflow
When String() was called on the maximum value of an integer type (eg
255 for uint8) this would cause an integer overflow, which would cause
an index error later in the code.

Fixed by re-arranging the code slightly.

Fixes golang/go#10563

Change-Id: I9fd016afc5eea22adbc3843f6081091fd50deccf
Reviewed-on: https://go-review.googlesource.com/9255
Reviewed-by: Rob Pike <r@golang.org>
2015-06-02 19:44:20 +00:00
..
cgo.go tools/cmd/stringer: fake import C. 2014-11-27 15:36:14 +11:00
day.go go.tools/cmd/stringer: add end-to-end test that compiles, runs, and verifies the generated method 2014-09-05 15:42:23 -07:00
gap.go go.tools/cmd/stringer: add end-to-end test that compiles, runs, and verifies the generated method 2014-09-05 15:42:23 -07:00
num.go go.tools/cmd/stringer: add end-to-end test that compiles, runs, and verifies the generated method 2014-09-05 15:42:23 -07:00
number.go go.tools/cmd/stringer: add end-to-end test that compiles, runs, and verifies the generated method 2014-09-05 15:42:23 -07:00
prime.go go.tools/cmd/stringer: add end-to-end test that compiles, runs, and verifies the generated method 2014-09-05 15:42:23 -07:00
unum2.go cmd/stringer: fix panic caused by integer overflow 2015-06-02 19:44:20 +00:00
unum.go go.tools/cmd/stringer: add end-to-end test that compiles, runs, and verifies the generated method 2014-09-05 15:42:23 -07:00