From cf837f3e5264d2c2a6a862b6753d56a6627ba880 Mon Sep 17 00:00:00 2001 From: Gareth George Date: Sun, 3 Aug 2025 13:29:50 -0700 Subject: [PATCH] add upper bound check to int parsing --- cmd/docker-entrypoint/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/docker-entrypoint/main.go b/cmd/docker-entrypoint/main.go index e555bd6..4fbffc5 100644 --- a/cmd/docker-entrypoint/main.go +++ b/cmd/docker-entrypoint/main.go @@ -82,12 +82,12 @@ func setupUserAndGroup() (int, int, error) { return 0, 0, nil } - puid, err := strconv.Atoi(puidStr) + puid, err := strconv.ParseUint(puidStr, 10, 32) if err != nil { return 0, 0, fmt.Errorf("invalid PUID: %v", err) } - pgid, err := strconv.Atoi(pgidStr) + pgid, err := strconv.ParseUint(pgidStr, 10, 32) if err != nil { return 0, 0, fmt.Errorf("invalid PGID: %v", err) }