[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Mon Apr 12 03:14:49 MDT 2010
The branch, master has been updated
via 928fb86... s4-ldb: fixed a crash bug for non-UTF8 strings
from acc81f9... build: Add an always parameter to CHECK_DECLS
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 928fb861507e2abed86258582f27aad7d71b308e
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Apr 12 18:39:50 2010 +1000
s4-ldb: fixed a crash bug for non-UTF8 strings
when one of the strings was not valid UTF8, we would try to
dereference NULL
-----------------------------------------------------------------------
Summary of changes:
source4/lib/ldb/common/attrib_handlers.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c
index 2a2bd08..2f4454c 100644
--- a/source4/lib/ldb/common/attrib_handlers.c
+++ b/source4/lib/ldb/common/attrib_handlers.c
@@ -269,7 +269,8 @@ utf8str:
* options but to do a binary compare */
talloc_free(b1);
talloc_free(b2);
- if (memcmp(s1, s2, MIN(n1, n2)) == 0) {
+ ret = memcmp(s1, s2, MIN(n1, n2));
+ if (ret == 0) {
if (n1 == n2) return 0;
if (n1 > n2) {
return (int)toupper(s1[n2]);
@@ -277,6 +278,7 @@ utf8str:
return -(int)toupper(s2[n1]);
}
}
+ return ret;
}
u1 = b1;
--
Samba Shared Repository
More information about the samba-cvs
mailing list