mirror of
https://github.com/golang/go
synced 2024-11-21 23:54:40 -07:00
syscall: fix bounds check in Error
Fixes #3042. R=golang-dev, iant CC=golang-dev https://golang.org/cl/5675067
This commit is contained in:
parent
e574480ed1
commit
014568bee1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user