nfsd: Fix misuse of strlcpy
authorJoe Perches <joe@perches.com>
Thu, 4 Jul 2019 23:57:48 +0000 (16:57 -0700)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 9 Jul 2019 03:16:11 +0000 (23:16 -0400)
Probable cut&paste typo - use the correct field size.

(Not currently a practical problem since these two fields have the same
size, but we should fix it anyway.)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4idmap.c

index 2961016097ac5588c8162a7f854f37a1d1c1ad7f..d1f285245af802f0ca190c2e383f73931f1356d3 100644 (file)
@@ -83,7 +83,7 @@ ent_init(struct cache_head *cnew, struct cache_head *citm)
        new->type = itm->type;
 
        strlcpy(new->name, itm->name, sizeof(new->name));
-       strlcpy(new->authname, itm->authname, sizeof(new->name));
+       strlcpy(new->authname, itm->authname, sizeof(new->authname));
 }
 
 static void