Skip to content

Commit

Permalink
nfsd: Fix misuse of strlcpy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and J. Bruce Fields committed Jul 9, 2019
1 parent a57caf8 commit c8320cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c8320cc

Please sign in to comment.