diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/nmblib.c | 4 |
1 files 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]); |