The Samba-Bugzilla – Attachment 15622 Details for
Bug 13876
NDR crash and memory allocation on large array values from untrustworthy servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for NDR_ERR_TOKEN issue
0001-pidl-Mismatch-between-set-and-get-of-relative-base-p.patch (text/plain), 1.68 KB, created by
Andrew Bartlett
on 2019-11-15 07:05:28 UTC
(
hide
)
Description:
fix for NDR_ERR_TOKEN issue
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2019-11-15 07:05:28 UTC
Size:
1.68 KB
patch
obsolete
>From 0d46b7ac909de50efed88f044e9469f976c388d2 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Fri, 15 Nov 2019 20:04:41 +1300 >Subject: [PATCH] pidl: Mismatch between set and get of relative base pointers > >The set was within the switch, the get was before the switch. > >The difference is shown when there is an empty default element. > >Signed-off-by: Andrew Bartlett <abartlet@samba.org> >--- > pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm >index 87cfe4498f6..b996ebcebce 100644 >--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm >+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm >@@ -2103,11 +2103,6 @@ sub ParseUnionPullDeferred($$$$) > my ($self,$e,$ndr,$varname) = @_; > my $have_default = 0; > >- if (defined($e->{PROPERTIES}{relative_base})) { >- # retrieve the current offset as base for relative pointers >- # based on the toplevel struct/union >- $self->pidl("NDR_CHECK(ndr_pull_setup_relative_base_offset2($ndr, $varname));"); >- } > $self->pidl("switch (level) {"); > $self->indent; > foreach my $el (@{$e->{ELEMENTS}}) { >@@ -2118,6 +2113,11 @@ sub ParseUnionPullDeferred($$$$) > $self->pidl("$el->{CASE}:"); > if ($el->{TYPE} ne "EMPTY") { > $self->indent; >+ if (defined($e->{PROPERTIES}{relative_base})) { >+ # retrieve the current offset as base for relative pointers >+ # based on the toplevel struct/union >+ $self->pidl("NDR_CHECK(ndr_pull_setup_relative_base_offset2($ndr, $varname));"); >+ } > $self->ParseElementPull($el, $ndr, {$el->{NAME} => "$varname->$el->{NAME}"}, 0, 1); > $self->deindent; > } >-- >2.17.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 13876
:
15621
|
15622
|
15623
|
15626