summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-27 15:52:16 +0200
committerKarolin Seeger <kseeger@samba.org>2012-04-07 16:25:55 +0200
commit75aeb61c38efe28503991834fb5181537cdffc68 (patch)
tree814ed7af8cac86f0a4dbe03687e23e5c60ff57ee /pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
parent0cc91c98f6d311a92aa308e9fcbac252c96d590d (diff)
downloadsamba-75aeb61c38efe28503991834fb5181537cdffc68.tar.gz
pidl: add support for [string] on fixed size arrays.
midl also supports this: struct { long l1; [string] wchar_t str[16]; long l2; }; Where the wire size of str is encoded like a length_is() header: 4-byte offset == 0; 4-byte array length; The strings are zero terminated. metze (cherry picked from commit 7ccc9a6ef563cc855752b4e74152420b9be5af43)
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index c822d6746e5..c4e3eb7d88c 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -326,7 +326,7 @@ sub ParseArrayPullHeader($$$$$$)
if ($l->{IS_CONFORMANT}) {
$length = $size = "ndr_get_array_size($ndr, " . get_pointer_to($var_name) . ")";
- } elsif ($l->{IS_ZERO_TERMINATED}) { # Noheader arrays
+ } elsif ($l->{IS_ZERO_TERMINATED} and $l->{SIZE_IS} == 0 and $l->{LENGTH_IS} == 0) { # Noheader arrays
$length = $size = "ndr_get_string_size($ndr, sizeof(*$var_name))";
} else {
$length = $size = ParseExprExt($l->{SIZE_IS}, $env, $e->{ORIGINAL},