git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c3dfd7
)
ldb:pyldb.c - we cannot use "ldb_dn_compare" if both message DNs are NULL in "py_ldb_...
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Mon, 7 Jun 2010 19:26:33 +0000
(21:26 +0200)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Mon, 7 Jun 2010 19:26:33 +0000
(21:26 +0200)
Discovered by the testcase.
source4/lib/ldb/pyldb.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/pyldb.c
b/source4/lib/ldb/pyldb.c
index bbb2e715b388ca6e2b95ce2595410697b8134f11..3a956ed6e24fdd68c1b1230a7b77ab47de9510d5 100644
(file)
--- a/
source4/lib/ldb/pyldb.c
+++ b/
source4/lib/ldb/pyldb.c
@@
-2087,9
+2087,11
@@
static int py_ldb_msg_compare(PyLdbMessageObject *py_msg1,
unsigned int i;
int ret;
- ret = ldb_dn_compare(msg1->dn, msg2->dn);
- if (ret != 0) {
- return ret;
+ if ((msg1->dn != NULL) || (msg2->dn != NULL)) {
+ ret = ldb_dn_compare(msg1->dn, msg2->dn);
+ if (ret != 0) {
+ return ret;
+ }
}
ret = msg1->num_elements - msg2->num_elements;