Skip to content

Commit

Permalink
Fix channel name off-by-one
Browse files Browse the repository at this point in the history
Found by: michaelortmann
Patch by: michaelortmann

strlcpy ftw!
  • Loading branch information
michaelortmann authored and vanosg committed Dec 13, 2019
1 parent 24554ef commit 73bba4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/users.c
Expand Up @@ -756,7 +756,7 @@ int readuserfile(char *file, struct userrec **ret)

cr->next = u->chanrec;
u->chanrec = cr;
strlcpy(cr->channel, chname, 80);
strlcpy(cr->channel, chname, sizeof cr->channel);
cr->laston = atoi(st);
cr->flags = fr.chan;
cr->flags_udef = fr.udef_chan;
Expand Down

0 comments on commit 73bba4f

Please sign in to comment.