summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-02-23 22:29:27 +0000
committerJeremy Allison <jra@samba.org>2000-02-23 22:29:27 +0000
commit693a582c23599bbdd45adb30401b1162e44fd274 (patch)
treea41d8533b68db78c96015e5945883da14a985a3c
parent9f879ec396230deba34fbe5e82d8a65f92137c54 (diff)
downloadsamba-693a582c23599bbdd45adb30401b1162e44fd274.tar.gz
samba-693a582c23599bbdd45adb30401b1162e44fd274.tar.xz
samba-693a582c23599bbdd45adb30401b1162e44fd274.zip
Multiple-dot scope handling fix from Greg Bowering gb@pobox.com
Jeremy.
-rw-r--r--source/libsmb/nmblib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c
index b83081d7f0d..7b62ca45461 100644
--- a/source/libsmb/nmblib.c
+++ b/source/libsmb/nmblib.c
@@ -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]);