summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-27 17:34:37 +0200
committerStefan Metzmacher <metze@samba.org>2009-07-27 17:51:32 +0200
commit92791ce9a8439ac06a22afdbeb0d0fc66c32cb31 (patch)
treeaa34262815255698af26a98b40bfaa5e2ebd09df
parent7ccc9a6ef563cc855752b4e74152420b9be5af43 (diff)
downloadsamba-92791ce9a8439ac06a22afdbeb0d0fc66c32cb31.tar.gz
samba-92791ce9a8439ac06a22afdbeb0d0fc66c32cb31.tar.bz2
samba-92791ce9a8439ac06a22afdbeb0d0fc66c32cb31.zip
pidl: allow foo being on the wire after [length_is(foo)] uint8 *buffer
metze
-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 d93661c491..3e724c986d 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1065,6 +1065,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);