]> git.sur5r.net Git - openldap/commitdiff
ITS#4977 check for cookie parse failure
authorHoward Chu <hyc@openldap.org>
Fri, 8 Jun 2007 09:05:35 +0000 (09:05 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 8 Jun 2007 09:05:35 +0000 (09:05 +0000)
servers/slapd/overlays/syncprov.c

index 64f87810f203f3f7728d6d1d896b9caeecbef533..6af467fe573794c3dd8affb94849f08706f4f81e 100644 (file)
@@ -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;
                }