lkml.org 
[lkml]   [2019]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 8/8] nfsd: Fix misuse of strlcpy
    Date
    Probable cut&paste typo - use the correct field size.

    Signed-off-by: Joe Perches <joe@perches.com>
    ---
    fs/nfsd/nfs4idmap.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
    index 2961016097ac..d1f285245af8 100644
    --- a/fs/nfsd/nfs4idmap.c
    +++ b/fs/nfsd/nfs4idmap.c
    @@ -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
    --
    2.15.0
    \
     
     \ /
      Last update: 2019-07-05 01:59    [W:4.048 / U:0.696 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site