git clone https://orangeshoelaces.net/git/ii.git
Author: Nico Golde on 07/16/2007
Committer: Nico Golde on 07/16/2007
fixed possible NULL pointer reference on sparc
ii.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ii.c b/ii.c
index 138d15a..1fd2df9 100644
--- a/ii.c
+++ b/ii.c
@@ -206,7 +206,7 @@ static void print_out(char *channel, char *buf) {
static char buft[18];
time_t t = time(0);
- snprintf(server, sizeof(server), "-!- %s", channel);
+ if(channel) snprintf(server, sizeof(server), "-!- %s", channel);
if(strstr(buf, server)) channel="";
create_filepath(outfile, sizeof(outfile), channel, "out");
if(!(out = fopen(outfile, "a"))) return;