Fix warning messages caused by addition of null check in fstrcpy macro.
[kai/samba.git] / source3 / nmbd / nmbd_incomingdgrams.c
index 6993e183583531e63e422b2801475dc5e51ec39d..d3b9d3d439b7bde0dc66dad41ea95b4869b0e59d 100644 (file)
@@ -172,7 +172,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
                        /* Update the record. */
                        servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY;
                        update_server_ttl( servrec, ttl);
-                       fstrcpy(servrec->serv.comment,comment);
+                       strlcpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment));
                }
        } else {
                /*
@@ -338,7 +338,7 @@ a local master browser for workgroup %s and we think we are master. Forcing elec
                        /* Update the record. */
                        servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY;
                        update_server_ttl(servrec, ttl);
-                       fstrcpy(servrec->serv.comment,comment);
+                       strlcpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment));
                }
        
                set_workgroup_local_master_browser_name( work, server_name );
@@ -512,7 +512,7 @@ originate from OS/2 Warp client. Ignoring packet.\n"));
                        /* Update the record. */
                        servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY;
                        update_server_ttl( servrec, ttl);
-                       fstrcpy(servrec->serv.comment,comment);
+                       strlcpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment));
                }
        } else {
                /*