Skip to content

Commit

Permalink
CHANSERV: fix null-pointer deference in lastreg command where user cr…
Browse files Browse the repository at this point in the history
…eated on website
  • Loading branch information
retropc committed Feb 20, 2022
1 parent ca650d8 commit f7b293e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chanserv/usercmds/lastreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int csa_dolastreg(void *source, int cargc, char **cargv) {
else
strcpy(tbuf2, "-");
suspended = (r->suspendtime > 0) ? "Suspended" : "";
chanservsendmessage(sender, "%-9u %-19s %-18s %-10s %-19s %s", userID, tbuf, r->username, suspended, tbuf2, r->lastuserhost->content);
chanservsendmessage(sender, "%-9u %-19s %-18s %-10s %-19s %s", userID, tbuf, r->username, suspended, tbuf2, r->lastuserhost ? r->lastuserhost->content : "");
count++;
if (userID == 0)
break;
Expand Down

0 comments on commit f7b293e

Please sign in to comment.