From 519b4a2139881567ca1173a65d33420a2cfcce7a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 25 Nov 2009 14:21:32 +0100 Subject: [PATCH] pidl:NDR/Parser: $size can be 'foo / 2' so we need to add '(' and ')' foo / 5 * sizeof(bar)' isn't the same as '(foo / 2) * sizeof(bar)'. metze (cherry picked from commit ab1c92950f3cfdc8c52b772ecef23a5477f48f9d) (cherry picked from commit d0d77d830072fbb5bda1c45f9df0722718f89096) --- pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 7ce9708e148..a5ee9481498 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -2119,7 +2119,7 @@ sub AllocateArrayLevel($$$$$$) $self->pidl("}"); if (grep(/in/,@{$e->{DIRECTION}}) and grep(/out/,@{$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}));"); } return; } -- 2.34.1