go/cmd
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
..
benchcmp benchmark/parser, cmd/benchcmp: improve names of exported identifiers 2015-01-15 01:28:17 +00:00
callgraph cmd/callgraph: update flag docstring 2015-05-29 17:21:31 +00:00
cover cmd/cover: check error 2015-06-02 04:29:08 +00:00
digraph tools: add import comments. 2014-12-09 22:42:16 +00:00
eg go/buildutil: TagsFlag provides a flag.Value for setting build.Context.BuildTags from -tags flag. 2015-04-23 14:10:21 +00:00
fiximports cmd/fiximports: a tool to rewrite import paths to match import comments. 2015-05-13 15:07:09 +00:00
godex tools: add import comments. 2014-12-09 22:42:16 +00:00
godoc cmd/godoc: skip tests on arm platforms 2015-03-16 02:06:44 +00:00
goimports goimports: create a var to permit custom implementations of flag parsing and 2015-03-27 18:14:11 +00:00
gomvpkg go/buildutil: TagsFlag provides a flag.Value for setting build.Context.BuildTags from -tags flag. 2015-04-23 14:10:21 +00:00
gorename go/buildutil: TagsFlag provides a flag.Value for setting build.Context.BuildTags from -tags flag. 2015-04-23 14:10:21 +00:00
gotype tools: add import comments. 2014-12-09 22:42:16 +00:00
html2article all: address vet reports 2014-12-29 06:08:34 +00:00
oracle cmd/oracle: improve error messages 2015-05-13 15:02:11 +00:00
present cmd/present: do not show help text on localhost 2015-02-23 10:31:29 +00:00
ssadump go/buildutil: TagsFlag provides a flag.Value for setting build.Context.BuildTags from -tags flag. 2015-04-23 14:10:21 +00:00
stress cmd/stress: print number of failed runs 2015-05-19 12:13:22 +00:00
stringer cmd/stringer: fix panic caused by integer overflow 2015-06-02 19:44:20 +00:00
tipgodoc cmd/tipgodoc: Kill godoc process if http.ListenAndServe fails 2015-04-08 14:14:19 +00:00
vet cmd/vet: add arm64 asmdecl support 2015-04-22 01:25:24 +00:00