mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
cgroupfs: do not return errors from strconv.ParseInt() to write()
Arbitrary errors are not convertible to errnos for syscall return and cause the sentry to panic. PiperOrigin-RevId: 564782206
This commit is contained in:
@@ -366,7 +366,7 @@ func toDeviceNumber(s string) (int64, error) {
|
||||
}
|
||||
val, err := strconv.ParseInt(s, 10, 64)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
return 0, linuxerr.EINVAL
|
||||
}
|
||||
return val, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user