From 1f28a345526908214240f36942c3a58e1f7bd138 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 23 Feb 2000 22:29:27 +0000 Subject: Multiple-dot scope handling fix from Greg Bowering gb@pobox.com Jeremy. (This used to be commit 693a582c23599bbdd45adb30401b1162e44fd274) --- source3/libsmb/nmblib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c index b83081d7f0..7b62ca4546 100644 --- a/source3/libsmb/nmblib.c +++ b/source3/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]); -- cgit