sasl_security_properties_t *secprops )
{
int i, j, l;
- char **props = ldap_str2charray( in, "," );
+ char **props;
unsigned sflags = 0;
int got_sflags = 0;
sasl_ssf_t max_ssf = 0;
unsigned maxbufsize = 0;
int got_maxbufsize = 0;
- if( props == NULL || secprops == NULL ) {
+ if( secprops == NULL ) {
+ return LDAP_PARAM_ERROR;
+ }
+ props = ldap_str2charray( in, "," );
+ if( props == NULL ) {
return LDAP_PARAM_ERROR;
}
if ( sprops[j].ival ) {
unsigned v;
char *next = NULL;
- if ( !isdigit( props[i][sprops[j].key.bv_len] )) continue;
+ if ( !isdigit( (unsigned char)props[i][sprops[j].key.bv_len] ))
+ continue;
v = strtoul( &props[i][sprops[j].key.bv_len], &next, 10 );
if ( next == &props[i][sprops[j].key.bv_len] || next[0] != '\0' ) continue;
switch( sprops[j].ival ) {
break;
}
if ( BER_BVISNULL( &sprops[j].key )) {
+ ldap_charray_free( props );
return LDAP_NOT_SUPPORTED;
}
}