From 856bf9bd48fc2dc3c981e9e5e0f4c3d0309a305d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 10 Aug 2007 22:52:04 +0000 Subject: [PATCH] ITS#5065 don't crash if old cookieCSN is sent --- servers/slapd/syncrepl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 289464fd4f..6e3d661473 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2586,6 +2586,11 @@ syncrepl_updateCookie( first = syncCookie->ctxcsn[i]; } } + /* Should never happen, ITS#5065 */ + if ( BER_BVISNULL( &first )) { + ldap_pvt_thread_mutex_unlock( &si->si_cookieState->cs_mutex ); + return 0; + } op->o_bd = si->si_wbe; slap_queue_csn( op, &first ); -- 2.39.5