The Samba-Bugzilla – Attachment 12232 Details for
Bug 11838
LDAP Search Attribute-"Range" Error if "Range" stars with a capital letter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
0001-s4-ldb-Ignore-case-of-range-in-sscanf-as-we-ve-alrea.patch (text/plain), 1.70 KB, created by
Jeremy Allison
on 2016-06-28 22:39:55 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-06-28 22:39:55 UTC
Size:
1.70 KB
patch
obsolete
>From 752a88e640901fe1cb0aa85f4f484bbc6d7f41c4 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 28 Jun 2016 15:38:22 -0700 >Subject: [PATCH] s4: ldb: Ignore case of "range" in sscanf as we've already > checked for its presence. > >https://bugzilla.samba.org/show_bug.cgi?id=11838 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source4/dsdb/samdb/ldb_modules/ranged_results.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/source4/dsdb/samdb/ldb_modules/ranged_results.c b/source4/dsdb/samdb/ldb_modules/ranged_results.c >index 60d7503..13bf3a2 100644 >--- a/source4/dsdb/samdb/ldb_modules/ranged_results.c >+++ b/source4/dsdb/samdb/ldb_modules/ranged_results.c >@@ -201,6 +201,8 @@ static int rr_search(struct ldb_module *module, struct ldb_request *req) > /* Strip the range request from the attribute */ > for (i = 0; req->op.search.attrs && req->op.search.attrs[i]; i++) { > char *p; >+ size_t range_len = strlen(";range="); >+ > new_attrs = talloc_realloc(req, new_attrs, const char *, i+2); > new_attrs[i] = req->op.search.attrs[i]; > new_attrs[i+1] = NULL; >@@ -208,12 +210,12 @@ static int rr_search(struct ldb_module *module, struct ldb_request *req) > if (!p) { > continue; > } >- if (strncasecmp(p, ";range=", strlen(";range=")) != 0) { >+ if (strncasecmp(p, ";range=", range_len) != 0) { > continue; > } > end = (unsigned int)-1; >- if (sscanf(p, ";range=%u-*", &start) != 1) { >- if (sscanf(p, ";range=%u-%u", &start, &end) != 2) { >+ if (sscanf(p + range_len, "%u-*", &start) != 1) { >+ if (sscanf(p + range_len, "%u-%u", &start, &end) != 2) { > ldb_asprintf_errstring(ldb, > "range request error: " > "range request malformed"); >-- >2.8.0.rc3.226.g39d4020 >
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
Flags:
abartlet
:
review+
Actions:
View
Attachments on
bug 11838
:
12231
|
12232
|
12247