The Samba-Bugzilla – Attachment 15588 Details for
Bug 13877
client-side crash in clusapi clusapi_QueryAllValues out
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to check array sizes in a deferred loop
0001-pidl-check-the-size-of-pulled-arrays-of-arrays.patch (text/plain), 1.33 KB, created by
Douglas Bagnall
on 2019-10-30 21:33:34 UTC
(
hide
)
Description:
patch to check array sizes in a deferred loop
Filename:
MIME Type:
Creator:
Douglas Bagnall
Created:
2019-10-30 21:33:34 UTC
Size:
1.33 KB
patch
obsolete
>From b382008e52f4fe33feeaf95f0607a06b11d63d5a Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Thu, 31 Oct 2019 09:35:19 +1300 >Subject: [PATCH] pidl: check the size of pulled arrays of arrays > >We were accidentally checking the memory just past the array instead of >checking each member. > >This could have led to the size of some arrays not being checked. > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> >--- > pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm >index 2fc4327faf4..52bae491086 100644 >--- pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm >+++ pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm >@@ -1247,10 +1247,14 @@ sub ParseElementPullLevel > > if ($deferred and ContainsDeferred($e, $l)) { > $self->pidl("for ($counter = 0; $counter < ($length); $counter++) {"); >+ $self->defer("for ($counter = 0; $counter < ($length); $counter++) {"); >+ $self->defer_indent; > $self->indent; > $self->ParseElementPullLevel($e,GetNextLevel($e,$l), $ndr, $var_name, $env, 0, 1); > $self->deindent; >+ $self->defer_deindent; > $self->pidl("}"); >+ $self->defer("}"); > } > > $self->ParseMemCtxPullEnd($e, $l, $ndr); >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13877
: 15588