From aa6a3de3166ec4c405ac0a2b325c5af60cc5427d Mon Sep 17 00:00:00 2001 From: PhoenixMage <1900747+PhoenixMage@users.noreply.github.com> Date: Mon, 30 Mar 2020 23:37:34 +1100 Subject: [PATCH] Fix 32bit overflow math.UaxUint32 will actually overflow on a 32 bit platform (tested on armv7) This will resolve that issue. --- pkg/util/fs_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go index a231c7e83c..53af15d4b9 100644 --- a/pkg/util/fs_util.go +++ b/pkg/util/fs_util.go @@ -725,7 +725,7 @@ func mkdirAllWithPermissions(path string, mode os.FileMode, uid, gid int64) erro } if uid > math.MaxUint32 || gid > math.MaxUint32 { // due to https://github.com/golang/go/issues/8537 - return errors.New(fmt.Sprintf("Numeric User-ID or Group-ID greater than %v are not properly supported.", math.MaxUint32)) + return errors.New(fmt.Sprintf("Numeric User-ID or Group-ID greater than %v are not properly supported.", uint64(math.MaxUint32))) } if err := os.Chown(path, int(uid), int(gid)); err != nil { return err