| commit | 014568bee123278ae51b0e6f53c909607806568e | [log] [tgz] |
|---|---|---|
| author | Russ Cox <rsc@golang.org> | Thu Feb 16 15:23:50 2012 -0500 |
| committer | Russ Cox <rsc@golang.org> | Thu Feb 16 15:23:50 2012 -0500 |
| tree | 2d466b57d42c72d942e254215f44e863a288ed1c | |
| parent | e574480ed14c1ec6e976f8df18bd63d51801f8b7 [diff] [blame] |
syscall: fix bounds check in Error Fixes #3042. R=golang-dev, iant CC=golang-dev https://golang.org/cl/5675067
diff --git a/src/pkg/syscall/syscall_unix.go b/src/pkg/syscall/syscall_unix.go index 26a12a6..d4e02f6 100644 --- a/src/pkg/syscall/syscall_unix.go +++ b/src/pkg/syscall/syscall_unix.go
@@ -95,7 +95,7 @@ type Errno uintptr func (e Errno) Error() string { - if 0 <= e && int(e) < len(errors) { + if 0 <= int(e) && int(e) < len(errors) { s := errors[e] if s != "" { return s