From: Howard Chu Date: Fri, 8 Jun 2007 09:08:39 +0000 (+0000) Subject: ITS#4977 fix from HEAD, check parse_sync_cookie failure X-Git-Tag: OPENLDAP_REL_ENG_2_3_36~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f34a8be0e79bd395556ed691a1121609771c057;p=thirdparty%2Fopenldap.git ITS#4977 fix from HEAD, check parse_sync_cookie failure --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index c98c8ea6c7..3021369f08 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2628,8 +2628,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; }