gcc7 fixes: NICKLEN -> NAMELEN
Use NAMELEN instead of NICKLEN when accessing Client->name because it could in theory be a HOSTLEN length string.
This commit is contained in:
parent
30053ab982
commit
fe5fc851aa
8 changed files with 24 additions and 22 deletions
|
@ -160,7 +160,7 @@ me_rsfnc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
|||
struct Client *target_p;
|
||||
struct Client *exist_p;
|
||||
time_t newts, curts;
|
||||
char note[NICKLEN + 10];
|
||||
char note[NAMELEN + 10];
|
||||
|
||||
if(!(source_p->flags & FLAGS_SERVICE))
|
||||
{
|
||||
|
@ -252,7 +252,7 @@ doit:
|
|||
|
||||
del_all_accepts(target_p);
|
||||
|
||||
snprintf(note, NICKLEN + 10, "Nick: %s", target_p->name);
|
||||
snprintf(note, sizeof(note), "Nick: %s", target_p->name);
|
||||
rb_note(target_p->localClient->F, note);
|
||||
}
|
||||
|
||||
|
|
|
@ -233,11 +233,11 @@ me_svslogin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou
|
|||
}
|
||||
else
|
||||
{
|
||||
char note[NICKLEN + 10];
|
||||
char note[NAMELEN + 10];
|
||||
|
||||
send_signon(NULL, target_p, nick, user, host, rb_current_time(), login);
|
||||
|
||||
snprintf(note, NICKLEN + 10, "Nick: %s", target_p->name);
|
||||
snprintf(note, sizeof(note), "Nick: %s", target_p->name);
|
||||
rb_note(target_p->localClient->F, note);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue