summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-10 22:36:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:30 -0500
commitd792ee488372c7259567d12b141cf449c0bdb6a8 (patch)
tree03774ac581374550030b2c9b7075e5fa0e51a7ad /source4/build
parentddcb89ccfc0d01bbd9a2b999833a5b095a13852d (diff)
downloadsamba-d792ee488372c7259567d12b141cf449c0bdb6a8.tar.gz
samba-d792ee488372c7259567d12b141cf449c0bdb6a8.tar.bz2
samba-d792ee488372c7259567d12b141cf449c0bdb6a8.zip
r4139: 2nd attempt at fixing the null ptr in size_is() problem.
(This used to be commit 3040cd65151dbcc54404f9be9d1fbcf539c7b635)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/parser.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index 375558e5dc..8fb74b2e0e 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -288,14 +288,18 @@ sub CheckArraySizes($$)
if (util::has_property($e, "size_is")) {
my $size = find_size_var($e, util::array_size($e), $var_prefix);
+ pidl "\tif ($var_prefix$e->{NAME}) {\n";
check_null_pointer($size);
- pidl "\tNDR_CHECK(ndr_check_array_size(ndr, (void*)&$var_prefix$e->{NAME}, $size));\n";
+ pidl "\t\tNDR_CHECK(ndr_check_array_size(ndr, (void*)&$var_prefix$e->{NAME}, $size));\n";
+ pidl "\t}\n";
}
if (my $length = util::has_property($e, "length_is")) {
$length = find_size_var($e, $length, $var_prefix);
+ pidl "\tif ($var_prefix$e->{NAME}) {\n";
check_null_pointer($length);
- pidl "\tNDR_CHECK(ndr_check_array_length(ndr, (void*)&$var_prefix$e->{NAME}, $length));\n";
+ pidl "\t\tNDR_CHECK(ndr_check_array_length(ndr, (void*)&$var_prefix$e->{NAME}, $length));\n";
+ pidl "\t}\n";
}
}