struct BlacklistStats *stats;
char *blacklist = source_p->preClient->auth.data;
- if((stats = rb_dictionary_retrieve(bl_stats, blacklist)) != NULL)
- stats->hits++;
+ if(bl_stats != NULL)
+ if((stats = rb_dictionary_retrieve(bl_stats, blacklist)) != NULL)
+ stats->hits++;
if(IsExemptKline(source_p) || IsConfExemptDNSBL(aconf))
{
{
if(!(source_p->flags & FLAGS_PINGSENT) && source_p->localClient->random_ping == 0)
{
- source_p->localClient->random_ping = (unsigned long) (rand() * rand()) << 1;
- sendto_one(source_p, "PING :%08lX",
- (unsigned long) source_p->localClient->random_ping);
+ source_p->localClient->random_ping = (uint32_t)(((rand() * rand()) << 1) | 1);
+ sendto_one(source_p, "PING :%08X",
+ (unsigned int) source_p->localClient->random_ping);
source_p->flags |= FLAGS_PINGSENT;
return -1;
}
*/
if(!*source_p->id)
{
- strcpy(source_p->id, generate_uid());
+ rb_strlcpy(source_p->id, generate_uid(), sizeof(source_p->id));
add_to_id_hash(source_p->id, source_p);
}