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);
|
char *line = sstrdup(cce->varname);
|
||||||
new_blacklist(line);
|
new_blacklist(line);
|
||||||
|
free(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -58,9 +58,9 @@ static void my_rhandler(connection_t * cptr)
|
||||||
{
|
{
|
||||||
char buf[BUFSIZE * 2];
|
char buf[BUFSIZE * 2];
|
||||||
|
|
||||||
if (!my_read(cptr, buf))
|
if (my_read(cptr, buf) <= 0)
|
||||||
connection_close(cptr);
|
connection_close(cptr);
|
||||||
|
else
|
||||||
do_packet(cptr, buf);
|
do_packet(cptr, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,9 @@ static void my_rhandler(connection_t * cptr)
|
||||||
{
|
{
|
||||||
char buf[BUFSIZE * 2];
|
char buf[BUFSIZE * 2];
|
||||||
|
|
||||||
if (!my_read(cptr, buf))
|
if (my_read(cptr, buf) <= 0)
|
||||||
connection_close(cptr);
|
connection_close(cptr);
|
||||||
|
else
|
||||||
do_packet(buf);
|
do_packet(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -579,7 +579,7 @@ static void trace_kill_exec(user_t *u, trace_action_t *act)
|
||||||
return;
|
return;
|
||||||
if (u->myuser && is_soper(u->myuser))
|
if (u->myuser && is_soper(u->myuser))
|
||||||
return;
|
return;
|
||||||
if ((svs = service_find("operserv")) != NULL)
|
if ((svs = service_find("operserv")) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
act->matched = true;
|
act->matched = true;
|
||||||
|
|
8
wumpus.c
8
wumpus.c
|
@ -630,9 +630,11 @@ move_wumpus(void *unused)
|
||||||
/* player_t *p has been eaten and is no longer in the game */
|
/* player_t *p has been eaten and is no longer in the game */
|
||||||
resign_player(p);
|
resign_player(p);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
/* prepare for the next turn */
|
{
|
||||||
p->has_moved = false;
|
/* prepare for the next turn */
|
||||||
|
p->has_moved = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* report any wumpus kills */
|
/* report any wumpus kills */
|
||||||
|
|
Loading…
Reference in New Issue