Multiple-dot scope handling fix from Greg Bowering gb@pobox.com
authorJeremy Allison <jra@samba.org>
Wed, 23 Feb 2000 22:29:27 +0000 (22:29 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 23 Feb 2000 22:29:27 +0000 (22:29 +0000)
Jeremy.

source/libsmb/nmblib.c

index b83081d7f0d826f1c235682f5468813aa47368bd..7b62ca45461ce7887a4fafae910a1c05f71777c8 100644 (file)
@@ -301,8 +301,8 @@ static int put_nmb_name(char *buf,int offset,struct nmb_name *name)
   
     p = &buf[offset+1];
     while ((p = strchr(p,'.'))) {
-      buf[offset] = PTR_DIFF(p,&buf[offset]);
-      offset += buf[offset];
+      buf[offset] = PTR_DIFF(p,&buf[offset+1]);
+      offset += (buf[offset] + 1);
       p = &buf[offset+1];
     }
     buf[offset] = strlen(&buf[offset+1]);