From: Howard Chu Date: Fri, 8 Jun 2007 09:05:35 +0000 (+0000) Subject: ITS#4977 check for cookie parse failure X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~418 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9227293e8d0a57b40538a87af99c45b6fc54f8db;p=openldap ITS#4977 check for cookie parse failure --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 64f87810f2..6af467fe57 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2785,8 +2785,8 @@ static int syncprov_parseCtrl ( sr->sr_rhint = rhint; if (!BER_BVISNULL(&cookie)) { ber_dupbv_x( &sr->sr_state.octet_str, &cookie, op->o_tmpmemctx ); - slap_parse_sync_cookie( &sr->sr_state, op->o_tmpmemctx ); - if ( sr->sr_state.rid == -1 ) { + if ( slap_parse_sync_cookie( &sr->sr_state, op->o_tmpmemctx ) || + sr->sr_state.rid == -1 ) { rs->sr_text = "Sync control : cookie parsing error"; return LDAP_PROTOCOL_ERROR; }