hostent_head[hostent_count].priority=priority;
hostent_head[hostent_count].weight=weight;
hostent_head[hostent_count].port=port;
- strncpy(hostent_head[hostent_count].hostname, host, MAXHOST);
+ strncpy(hostent_head[hostent_count].hostname, host, MAXHOST-1);
+ hostent_head[hostent_count].hostname[MAXHOST-1] = '\0';
hostent_count++;
}
add_size:;
p += size;
}
+ if (!hostent_head) goto out;
qsort(hostent_head, hostent_count, sizeof(srv_record), srv_cmp);
if (!srv_seed)
dot=0;
} else if ( str[i] == '.' ) {
- if( dot ) return 0;
if( ++dot > 1 ) return 0;
} else {
dot=0;
} else if ( str[i] == '.' ) {
- if( dot ) return 0;
if( ++dot > 1 ) return 0;
} else {
int rc =0;
if ( ber_printf( ber, "{" /*"}"*/ ) == -1 ) {
- rc = -1;
+ return -1;
}
rc = put_vrFilter( ber, str_in );