summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-27 17:34:37 +0200
committerKarolin Seeger <kseeger@samba.org>2012-04-07 16:25:57 +0200
commitdd5faa13873fbdd92fa4ddd82dc69d34a73e4d1f (patch)
tree8ddf3f6c93cc4fd9f3cdc14545c7d921d4064328
parent75aeb61c38efe28503991834fb5181537cdffc68 (diff)
downloadsamba-dd5faa13873fbdd92fa4ddd82dc69d34a73e4d1f.tar.gz
pidl: allow foo being on the wire after [length_is(foo)] uint8 *buffer
metze (cherry picked from commit 92791ce9a8439ac06a22afdbeb0d0fc66c32cb31)
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index c4e3eb7d88c..a05f2851786 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1069,6 +1069,10 @@ sub ParseElementPullLevel
my $counter = "cntr_$e->{NAME}_$l->{LEVEL_INDEX}";
my $array_name = $var_name;
+ if ($l->{IS_VARYING}) {
+ $length = "ndr_get_array_length($ndr, " . get_pointer_to($var_name) .")";
+ }
+
$var_name = get_array_element($var_name, $counter);
$self->ParseMemCtxPullStart($e, $l, $ndr, $array_name);