nmbd: Use strlcpy instead of StrnCpy
authorVolker Lendecke <vl@samba.org>
Mon, 31 Dec 2018 06:15:03 +0000 (07:15 +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/nmbd/nmbd_incomingdgrams.c

index 6fedcfd..e898005 100644 (file)
@@ -607,7 +607,7 @@ static void send_backup_list_response(struct subnet_record *subrec,
     if(!(servrec->serv.type & SV_TYPE_BACKUP_BROWSER))
       continue;
 
-    StrnCpy(p, servrec->serv.name, 15);
+    strlcpy(p, servrec->serv.name, 16);
     strupper_m(p);
     count++;