From: Howard Chu Date: Tue, 29 Sep 2009 03:10:03 +0000 (+0000) Subject: ITS#6288 don't deref sort control if it wasn't set X-Git-Tag: ACLCHECK_0~211 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e601e8291d186a39b1fe0991eb68e8e4c745f7b;p=openldap ITS#6288 don't deref sort control if it wasn't set --- diff --git a/servers/slapd/overlays/sssvlv.c b/servers/slapd/overlays/sssvlv.c index 8dccdab02c..5c82b91212 100644 --- a/servers/slapd/overlays/sssvlv.c +++ b/servers/slapd/overlays/sssvlv.c @@ -696,7 +696,7 @@ static int sssvlv_op_search( int rc = SLAP_CB_CONTINUE; int ok; sort_op *so, so2; - sort_ctrl *sc = op->o_controls[sss_cid]; + sort_ctrl *sc; PagedResultsState *ps; vlv_ctrl *vc; @@ -725,6 +725,7 @@ static int sssvlv_op_search( op->o_req_dn.bv_val, op->ors_filterstr.bv_val, op->o_ctrlflag[sss_cid]); + sc = op->o_controls[sss_cid]; if ( sc->sc_nkeys > si->svi_max_keys ) { rs->sr_text = "Too many sort keys"; rs->sr_err = LDAP_UNWILLING_TO_PERFORM;