From: Howard Chu Date: Fri, 10 Aug 2007 22:52:04 +0000 (+0000) Subject: ITS#5065 don't crash if old cookieCSN is sent X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~245 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=856bf9bd48fc2dc3c981e9e5e0f4c3d0309a305d;p=openldap ITS#5065 don't crash if old cookieCSN is sent --- 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 );