libsmb: Use strlcpy instead of StrnCpy
authorVolker Lendecke <vl@samba.org>
Mon, 31 Dec 2018 06:14:48 +0000 (07:14 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 8 Jan 2019 02:40:26 +0000 (03:40 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/namequery.c

index 6564f48..abeed97 100644 (file)
@@ -274,7 +274,7 @@ static struct node_status *parse_node_status(TALLOC_CTX *mem_ctx, char *p,
 
        p++;
        for (i=0;i< *num_names;i++) {
-               StrnCpy(ret[i].name,p,15);
+               strlcpy(ret[i].name,p,16);
                trim_char(ret[i].name,'\0',' ');
                ret[i].type = CVAL(p,15);
                ret[i].flags = p[16];