Check for uint32 overflow in go9p third party

pull/11080/head
Anders F Björklund 2021-04-12 19:48:35 +02:00
parent 85443b65e1
commit 24aee007db
2 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@ func (*Pipefs) Create(req *SrvReq) {
e = os.Symlink(tc.Ext, path)
case tc.Perm&DMLINK != 0:
n, e := strconv.ParseUint(tc.Ext, 10, 0)
n, e := strconv.ParseUint(tc.Ext, 10, 32)
if e != nil {
break
}

View File

@ -264,7 +264,7 @@ func (*Ufs) Create(req *SrvReq) {
e = os.Symlink(tc.Ext, path)
case tc.Perm&DMLINK != 0:
n, e := strconv.ParseUint(tc.Ext, 10, 0)
n, e := strconv.ParseUint(tc.Ext, 10, 32)
if e != nil {
break
}
@ -467,7 +467,7 @@ func lookup(uid string, group bool) (uint32, *Error) {
if group {
conv = usr.Gid
}
u, e := strconv.Atoi(conv)
u, e := strconv.ParseUint(conv, 10, 32)
if e != nil {
return NOUID, toError(e)
}