summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm4
-rwxr-xr-xsource4/pidl/tests/wireshark-conf.pl5
2 files changed, 6 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 60d5bf8781..ef3eb3dbcf 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2149,9 +2149,9 @@ sub ParseFunctionPull($$)
$self->pidl("NDR_PULL_ALLOC_N(ndr, r->out.$e->{NAME}, $size);");
if (grep(/in/, @{$e->{DIRECTION}})) {
- $self->pidl("memcpy(r->out.$e->{NAME}, r->in.$e->{NAME}, $size * sizeof(*r->in.$e->{NAME}));");
+ $self->pidl("memcpy(r->out.$e->{NAME}, r->in.$e->{NAME}, ($size) * sizeof(*r->in.$e->{NAME}));");
} else {
- $self->pidl("memset(r->out.$e->{NAME}, 0, $size * sizeof(*r->out.$e->{NAME}));");
+ $self->pidl("memset(r->out.$e->{NAME}, 0, ($size) * sizeof(*r->out.$e->{NAME}));");
}
} else {
$self->pidl("NDR_PULL_ALLOC(ndr, r->out.$e->{NAME});");
diff --git a/source4/pidl/tests/wireshark-conf.pl b/source4/pidl/tests/wireshark-conf.pl
index d6fe3158aa..c06ac16de4 100755
--- a/source4/pidl/tests/wireshark-conf.pl
+++ b/source4/pidl/tests/wireshark-conf.pl
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 47;
+use Test::More tests => 48;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -164,6 +164,9 @@ test_errors("nofile:1: no dissectorname specified\n",
test_errors("nofile:1: incomplete HF_FIELD command\n",
sub { parse_conf("HF_FIELD hf_idx\n"); });
+test_errors("nofile:1: incomplete ETT_FIELD command\n",
+ sub { parse_conf("ETT_FIELD\n"); });
+
is_deeply(parse_conf("TYPE winreg_String dissect_myminregstring(); FT_STRING BASE_DEC 0 0 0 2\n"), {
types => {
winreg_String => {