Commit 014568be authored by Russ Cox's avatar Russ Cox

syscall: fix bounds check in Error

Fixes #3042.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5675067
parent e574480e
......@@ -95,7 +95,7 @@ func (m *mmapper) Munmap(data []byte) (err error) {
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment