git.samba.org
/
mat
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
librpc/ndr_nbt: we need to keep a trailing '.' in the last component of an nbt_string
[mat/samba.git]
/
librpc
/
ndr
/
ndr_nbt.c
diff --git
a/librpc/ndr/ndr_nbt.c
b/librpc/ndr/ndr_nbt.c
index 842e9720c32f0753b71737d74c477cf810a495c3..ada1335b57d7de89df46c0c76286b1418252bb1f 100644
(file)
--- a/
librpc/ndr/ndr_nbt.c
+++ b/
librpc/ndr/ndr_nbt.c
@@
-179,6
+179,10
@@
_PUBLIC_ enum ndr_err_code ndr_push_nbt_string(struct ndr_push *ndr, int ndr_fla
(unsigned)complen, (unsigned)complen);
}
+ if (s[complen] == '.' && s[complen+1] == '\0') {
+ complen++;
+ }
+
compname = talloc_asprintf(ndr, "%c%*.*s",
(unsigned char)complen,
(unsigned char)complen,