From: Kurt Zeilenga Date: Mon, 28 Jun 1999 22:22:27 +0000 (+0000) Subject: Validate outvalue after session param. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~230 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1fd3c797a822ac121a481f5ba686779d6e620ed8;p=openldap Validate outvalue after session param. --- diff --git a/libraries/libldap/options.c b/libraries/libldap/options.c index 748f9c4078..ef19dfda61 100644 --- a/libraries/libldap/options.c +++ b/libraries/libldap/options.c @@ -88,11 +88,6 @@ ldap_get_option( ldap_int_initialize(); } - if(outvalue == NULL) { - /* no place to get to */ - return LDAP_OPT_ERROR; - } - if(ld == NULL) { lo = &ldap_int_global_options; @@ -106,6 +101,11 @@ ldap_get_option( lo = &ld->ld_options; } + if(outvalue == NULL) { + /* no place to get to */ + return LDAP_OPT_ERROR; + } + switch(option) { case LDAP_OPT_API_INFO: { struct ldapapiinfo *info = (struct ldapapiinfo *) outvalue;