Last-Update: 2018-06-16
Forwarded: https://github.com/opencontainers/runc/pull/1821
Bug-Upstream: https://github.com/opencontainers/runc/issues/941
Author: Dmitry Smirnov <onlyjob@debian.org>
Description: fix FTBFS on i686
 src/github.com/opencontainers/runc/libcontainer/user/user_test.go:448:36: constant 2147483648 overflows int

--- a/libcontainer/user/user_test.go
+++ b/libcontainer/user/user_test.go
@@ -444,9 +444,9 @@
 
 	if utils.GetIntSize() > 4 {
 		tests = append(tests, foo{
 			// groups with too large id
-			groups:   []string{strconv.Itoa(1 << 31)},
+			groups:   []string{strconv.Itoa( 1<<31 -1 )},
 			expected: nil,
 			hasError: true,
 		})
 	}
--- a/libcontainer/user/user.go
+++ b/libcontainer/user/user.go
@@ -472,9 +472,9 @@
 			if err != nil {
 				return nil, fmt.Errorf("Unable to find group %s", ag)
 			}
 			// Ensure gid is inside gid range.
-			if gid < minId || gid > maxId {
+			if gid < minId || gid >= maxId {
 				return nil, ErrRange
 			}
 			gidMap[gid] = struct{}{}
 		}
