Fix comment strings to 43 bytes as per spec.
authorJeremy Allison <jra@samba.org>
Mon, 1 Sep 2003 18:28:09 +0000 (18:28 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 1 Sep 2003 18:28:09 +0000 (18:28 +0000)
Jeremy.
(This used to be commit f1ec43fae400455d20931ab2d3ecd8f9a6609050)

source3/nmbd/nmbd_incomingdgrams.c

index 49fad8e86759b872987af3e4ee7beb0c3265fa46..f646e397162a424c5f71ac02a24c2fc3def0771d 100644 (file)
@@ -108,7 +108,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
        START_PROFILE(host_announce);
 
        pull_ascii_fstring(comment, buf+31);
-       comment[12] = 0;
+       comment[42] = 0;
   
        pull_ascii_nstring(announce_name, buf+5);
        pull_ascii_nstring(source_name, dgram->source_name.name);
@@ -209,7 +209,6 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru
 
        pull_ascii_nstring(workgroup_announce_name,buf+5);
        pull_ascii_nstring(master_name,buf+31);
-       master_name[12] = 0;
        pull_ascii_nstring(source_name,dgram->source_name.name);
        pull_ascii_nstring(dest_name,dgram->dest_name.name);
 
@@ -268,7 +267,7 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s
 
        pull_ascii_nstring(server_name,buf+5);
        pull_ascii_fstring(comment, buf+31);
-       comment[12] = 0;
+       comment[42] = 0;
        pull_ascii_nstring(source_name, dgram->source_name.name);
        pull_ascii_nstring(work_name, dgram->dest_name.name);