mirror of
https://github.com/golang/go
synced 2024-11-19 20:54:39 -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
|
type Errno uintptr
|
||||||
|
|
||||||
func (e Errno) Error() string {
|
func (e Errno) Error() string {
|
||||||
if 0 <= e && int(e) < len(errors) {
|
if 0 <= int(e) && int(e) < len(errors) {
|
||||||
s := errors[e]
|
s := errors[e]
|
||||||
if s != "" {
|
if s != "" {
|
||||||
return s
|
return s
|
||||||
|
Loading…
Reference in New Issue
Block a user