From c94f1c16bd6fff25f582ecfa920513b9c9665629 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 13 May 2010 02:27:29 +0200 Subject: 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 --- source3/librpc/ndr/ndr_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/ndr/ndr_string.c') 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 -- cgit