ParseArrayPullHeader
tridge at samba.org
tridge at samba.org
Sat Aug 13 05:00:19 GMT 2005
Jelmer,
Looking at this some more, I think a possible solution is something
like this:
if ($l->{IS_CONFORMANT} and not $l->{IS_ZERO_TERMINATED}) {
my $size = ParseExpr($l->{SIZE_IS}, $env);
start_deferred($env);
check_null_pointer($size);
pidl "NDR_CHECK(ndr_check_array_size(ndr, (void*)" . get_pointer_to($var_name) . ", $size));";
end_deferred($env);
}
notice the start_deferred()/end_deferred() pair? That would signify
that this code should be deferred to the end of the
function/structure. It would be kept in $env->{DEFERRED} and we would
have a hook at the end of functions like ParseStructPush() to add the
$env->{DEFERRED} content to $res.
Do you think that would work ok?
Cheers, Tridge
More information about the samba-technical
mailing list