summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-04-05 04:44:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:00:16 -0500
commit66a0d692564e5392588247696e2156b85252cbea (patch)
tree799d0e0519d1372dbd5e4389eea94787cdbc8af6 /source4/librpc/ndr
parentb9ccb39c48870b0a84e19e816932d08b3304c1f4 (diff)
downloadsamba-66a0d692564e5392588247696e2156b85252cbea.tar.gz
samba-66a0d692564e5392588247696e2156b85252cbea.tar.bz2
samba-66a0d692564e5392588247696e2156b85252cbea.zip
r14917: fixed length strings don't count any trailing nulls in the length
(This used to be commit 28d9a4d1a7aab0852f7f718621830f06cd7ff39b)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r--source4/librpc/ndr/ndr_string.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c
index 80b900211d..46f58c9788 100644
--- a/source4/librpc/ndr/ndr_string.c
+++ b/source4/librpc/ndr/ndr_string.c
@@ -317,7 +317,10 @@ _PUBLIC_ NTSTATUS ndr_push_string(struct ndr_push *ndr, int ndr_flags, const cha
flags &= ~LIBNDR_FLAG_STR_CONFORMANT;
- if (!(flags & LIBNDR_FLAG_STR_NOTERM)) {
+ if (!(flags &
+ (LIBNDR_FLAG_STR_NOTERM |
+ LIBNDR_FLAG_STR_FIXLEN15 |
+ LIBNDR_FLAG_STR_FIXLEN32))) {
s_len++;
}
d_len = convert_string_talloc(ndr, CH_UNIX, chset, s, s_len, (void **)&dest);