From: Jim Meyering <jim@meyering.net>
Date: Sat, 16 Dec 2000 13:28:13 +0000 (+0000)
Subject: This bug had a serious impact on chown: `chown N:M FILE' (for integer
X-Git-Tag: FILEUTILS-4_0_34~22
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=cbcbda2a2172259f47eb6a852d59009c7d8ab73b;p=gnulib.git

This bug had a serious impact on chown: `chown N:M FILE' (for integer
N and M) would have treated it like `chown N:N FILE'.
(parse_user_spec): Fix typo: s/u/g/.
---

diff --git a/lib/userspec.c b/lib/userspec.c
index 3b69d7395a..3e67b1b563 100644
--- a/lib/userspec.c
+++ b/lib/userspec.c
@@ -304,7 +304,7 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
 	  else
 	    {
 	      unsigned long int tmp_long;
-	      if (xstrtoul (u, NULL, 0, &tmp_long, NULL) != LONGINT_OK
+	      if (xstrtoul (g, NULL, 0, &tmp_long, NULL) != LONGINT_OK
 		  || tmp_long > MAXGID)
 		return _(E_invalid_group);
 	      *gid = tmp_long;