mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
make sure we don't try to use c++ style variable declaration
(This used to be commit 9fee73793171e2cd295899ec0db8bcecfa95ca72)
This commit is contained in:
parent
f3a4d83711
commit
5d77cda1dc
@ -256,13 +256,15 @@ sub ParseArrayPull($$$)
|
||||
}
|
||||
}
|
||||
|
||||
pidl "\t{\n";
|
||||
|
||||
if (my $length = util::has_property($e, "length_is")) {
|
||||
$length = find_size_var($e, $length);
|
||||
pidl "\t\tuint32 _offset, _length;\n";
|
||||
pidl "\t\tNDR_CHECK(ndr_pull_uint32(ndr, &_offset));\n";
|
||||
pidl "\t\tNDR_CHECK(ndr_pull_uint32(ndr, &_length));\n";
|
||||
pidl "\t\tif (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, \"Bad array offset 0x%08x\", _offset);\n";
|
||||
pidl "\t\tif (_length > $size || _length != $length) return ndr_pull_error(ndr, NDR_ERR_LENGTH, \"Bad array length 0x%08x > size 0x%08x\", _offset, $size);\n";
|
||||
pidl "\t\tif (_length > $size || _length != $length) return ndr_pull_error(ndr, NDR_ERR_LENGTH, \"Bad array length 0x%08x > size 0x%08x\", _offset, $size);\n\n";
|
||||
$size = "_length";
|
||||
}
|
||||
|
||||
@ -271,6 +273,8 @@ sub ParseArrayPull($$$)
|
||||
} else {
|
||||
pidl "\t\tNDR_CHECK(ndr_pull_array(ndr, $ndr_flags, (void **)$var_prefix$e->{NAME}, sizeof($var_prefix$e->{NAME}\[0]), $size, (ndr_pull_flags_fn_t)ndr_pull_$e->{TYPE}));\n";
|
||||
}
|
||||
|
||||
pidl "\t}\n";
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user