From c94f1c16bd6fff25f582ecfa920513b9c9665629 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 13 May 2010 02:27:29 +0200 Subject: [PATCH] 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(-) diff --git a/source3/librpc/ndr/ndr_string.c b/source3/librpc/ndr/ndr_string.c index 519be7b1a03..b4891e3c1fd 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 -- 2.11.4.GIT