Skip to content

Commit

Permalink
Fix potential issue in vertex-kernel while converting int64 to int32
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinguidee committed Sep 26, 2023
1 parent e87d28f commit 8b02973
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ func getUser(username string) *user.User {
}

func runVertex(user *user.User) (*exec.Cmd, error) {
uid, err := strconv.Atoi(user.Uid)
uid, err := strconv.ParseInt(user.Uid, 10, 32)
if err != nil {
return nil, err
}

gid, err := strconv.Atoi(user.Gid)
gid, err := strconv.ParseInt(user.Gid, 10, 32)
if err != nil {
return nil, err
}

log.Info("Running vertex",
vlog.String("username", user.Username),
vlog.Int("uid", uid),
vlog.Int("gid", gid),
vlog.Int64("uid", uid),
vlog.Int64("gid", gid),
)

// If vertex init.go is there, build vertex first.
Expand Down

0 comments on commit 8b02973

Please sign in to comment.