ldap/servers/plugins/replication/windows_private.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 0c40b2cc4452bb28554c19de85737b9151c7696b
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Dec 2 12:28:05 2010 -0800
Bug 659456 - Incorrect usage of ber_printf() in winsync code
In the winsync code, we can end up passing a NULL pointer to
ber_printf() when we want to add an octet string for the dirsync
cookie. This causes a SIGABRT when using a debug build on F14
since you are not supposed to pass a NULL.
The fix is to pass an empty string when the cookie is NULL.
diff --git a/ldap/servers/plugins/replication/windows_private.c
b/ldap/servers/plugins/replication/windows_private.c
index 2d47441..f36814b 100644
--- a/ldap/servers/plugins/replication/windows_private.c
+++ b/ldap/servers/plugins/replication/windows_private.c
@@ -611,7 +611,7 @@ LDAPControl* windows_private_dirsync_control(const Repl_Agmt *ra)
PR_ASSERT (dp);
ber = ber_alloc();
- ber_printf( ber, "{iio}", dp->dirsync_flags,
dp->dirsync_maxattributecount, dp->dirsync_cookie, dp->dirsync_cookie_len );
+ ber_printf( ber, "{iio}", dp->dirsync_flags,
dp->dirsync_maxattributecount, dp->dirsync_cookie ? dp->dirsync_cookie :
"", dp->dirsync_cookie_len );
/* Use a regular directory server instead of a real AD - for testing */
if (getenv("WINSYNC_USE_DS")) {
Show replies by date