Merge pull request #29 from attilamolnar/master+fixes
Fixes for bugs discovered by Coverity Scan and myself
This commit is contained in:
commit
1416aa428d
1
dnsbl.c
1
dnsbl.c
|
@ -444,6 +444,7 @@ static int dnsbl_config_handler(mowgli_config_file_entry_t *ce)
|
|||
{
|
||||
char *line = sstrdup(cce->varname);
|
||||
new_blacklist(line);
|
||||
free(line);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -58,9 +58,9 @@ static void my_rhandler(connection_t * cptr)
|
|||
{
|
||||
char buf[BUFSIZE * 2];
|
||||
|
||||
if (!my_read(cptr, buf))
|
||||
if (my_read(cptr, buf) <= 0)
|
||||
connection_close(cptr);
|
||||
|
||||
else
|
||||
do_packet(cptr, buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,9 +62,9 @@ static void my_rhandler(connection_t * cptr)
|
|||
{
|
||||
char buf[BUFSIZE * 2];
|
||||
|
||||
if (!my_read(cptr, buf))
|
||||
if (my_read(cptr, buf) <= 0)
|
||||
connection_close(cptr);
|
||||
|
||||
else
|
||||
do_packet(buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -579,7 +579,7 @@ static void trace_kill_exec(user_t *u, trace_action_t *act)
|
|||
return;
|
||||
if (u->myuser && is_soper(u->myuser))
|
||||
return;
|
||||
if ((svs = service_find("operserv")) != NULL)
|
||||
if ((svs = service_find("operserv")) == NULL)
|
||||
return;
|
||||
|
||||
act->matched = true;
|
||||
|
|
Loading…
Reference in New Issue