]> git.sur5r.net Git - openldap/commitdiff
ITS#4977 fix from HEAD, check parse_sync_cookie failure
authorHoward Chu <hyc@openldap.org>
Fri, 8 Jun 2007 09:08:39 +0000 (09:08 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 8 Jun 2007 09:08:39 +0000 (09:08 +0000)
servers/slapd/overlays/syncprov.c

index c98c8ea6c7d661b437fb4cf57658c4f6c169535b..3021369f08f6b744d6cf5f2bbf9c04c544a59b13 100644 (file)
@@ -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;
                }