Skip to content

Commit

Permalink
egg_snprintf() -> snprintf() and fix a format truncation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ortmann committed Oct 16, 2023
1 parent 1185f99 commit 86beaab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mod/server.mod/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ static void check_queues(char *oldnick, char *newnick)
static void parse_q(struct msgq_head *q, char *oldnick, char *newnick)
{
struct msgq *m, *lm = NULL;
char buf[SENDLINEMAX], *msg, *nicks, *nick, *chan, newnicks[SENDLINEMAX],
char buf[SENDLINEMAX], *msg, *nicks, *nick, *chan, newnicks[SENDLINEMAX - 8],
newmsg[SENDLINEMAX];
int changed;
size_t len;
Expand Down Expand Up @@ -610,8 +610,8 @@ static void parse_q(struct msgq_head *q, char *oldnick, char *newnick)
if (!q->head)
q->last = 0;
} else {
len = egg_snprintf(newmsg, sizeof newmsg, "KICK %s %s %s", chan,
newnicks + 1, msg);
len = snprintf(newmsg, sizeof newmsg, "KICK %s %s %s", chan,
newnicks + 1, msg);
nfree(m->msg);
m->msg = nmalloc(len + 1);
m->len = len;
Expand Down

0 comments on commit 86beaab

Please sign in to comment.