]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
unshare: fix typo in uint_to_id()
authorKarel Zak <kzak@redhat.com>
Tue, 18 Jan 2022 11:46:58 +0000 (12:46 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 18 Jan 2022 11:46:58 +0000 (12:46 +0100)
Reported-by: Daniel Gerber <dg@atufi.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/unshare.c

index 6723a34eb31ea3a7975e68f899133edfcf6e44e4..b8173b4fe45d7e17c268be97ae1eefcc2e7eaabc 100644 (file)
@@ -388,7 +388,7 @@ static int uint_to_id(const char *name, size_t sz)
        char buf[UID_BUFSIZ];
 
        mem2strcpy(buf, name, sz, sizeof(buf));
-       return strtoul_or_err(name, _("could not parse ID"));
+       return strtoul_or_err(buf, _("could not parse ID"));
 }
 
 /**