summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-13 02:27:29 +0200
committerGünther Deschner <gd@samba.org>2010-05-14 13:20:40 +0200
commitc94f1c16bd6fff25f582ecfa920513b9c9665629 (patch)
treebd7a6f26cdd44a589bab9a125d36e8c283baf5a8
parentedecdab58f49481a2f9ef0ca59ef1407adba8e05 (diff)
downloadsamba-c94f1c16bd6fff25f582ecfa920513b9c9665629.tar.gz
samba-c94f1c16bd6fff25f582ecfa920513b9c9665629.tar.bz2
samba-c94f1c16bd6fff25f582ecfa920513b9c9665629.zip
s3-libndr: make sure ndr_pull_string_array() only inspects string termination flags.
Otherwise the NOTERM case is not reachable for ascii strings (only utf16). With this patch we now can have: [flag(STR_ASCII|STR_NOTERM|NDR_REMAINING)] string_array array_name; Guenther
-rw-r--r--source3/librpc/ndr/ndr_string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/librpc/ndr/ndr_string.c b/source3/librpc/ndr/ndr_string.c
index 519be7b1a0..b4891e3c1f 100644
--- a/source3/librpc/ndr/ndr_string.c
+++ b/source3/librpc/ndr/ndr_string.c
@@ -452,7 +452,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int ndr_f
return NDR_ERR_SUCCESS;
}
- switch (flags & LIBNDR_STRING_FLAGS) {
+ switch (flags & (LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_STR_NOTERM)) {
case LIBNDR_FLAG_STR_NULLTERM:
/*
* here the strings are null terminated