The Samba-Bugzilla – Attachment 13370 Details for
Bug 12900
index out of bound in ldb_msg_find_common_values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch avoiding getting anywhere near the out-of-bounds error
0002-ldb-avoid-searching-empty-lists-in-ldb_msg_find_comm.patch (text/plain), 1.08 KB, created by
Douglas Bagnall
on 2017-07-13 04:39:00 UTC
(
hide
)
Description:
patch avoiding getting anywhere near the out-of-bounds error
Filename:
MIME Type:
Creator:
Douglas Bagnall
Created:
2017-07-13 04:39:00 UTC
Size:
1.08 KB
patch
obsolete
>From 125c06db18577f60bd81dacb0ea250bf9ccafdd0 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Thu, 6 Jul 2017 10:01:24 +1200 >Subject: [PATCH 2/3] ldb: avoid searching empty lists in > ldb_msg_find_common_values > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12900 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andreas Schneider <asn@samba.org> >(cherry picked from commit 282410fa2416404962521ad6b2598a9c83b63594) >--- > lib/ldb/common/ldb_msg.c | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/lib/ldb/common/ldb_msg.c b/lib/ldb/common/ldb_msg.c >index 8e4047b..c2782db 100644 >--- a/lib/ldb/common/ldb_msg.c >+++ b/lib/ldb/common/ldb_msg.c >@@ -207,6 +207,9 @@ int ldb_msg_find_common_values(struct ldb_context *ldb, > if (strcmp(el->name, el2->name) != 0) { > return LDB_ERR_INAPPROPRIATE_MATCHING; > } >+ if (el->num_values == 0 || el2->num_values == 0) { >+ return LDB_SUCCESS; >+ } > /* > With few values, it is better to do the brute-force search than the > clever search involving tallocs, memcpys, sorts, etc. >-- >2.7.4 >
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 12900
:
13369
| 13370 |
13371