From 2ef034d1111fe65fc4e5175896624c30b8aee9dd Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Sat, 21 Aug 2021 08:54:16 -0700 Subject: [PATCH] Avoid show_iline_prefix showing leftovers (#266) --- ircd/hostmask.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ircd/hostmask.c b/ircd/hostmask.c index 79eabf82..6b50b5e5 100644 --- a/ircd/hostmask.c +++ b/ircd/hostmask.c @@ -710,8 +710,7 @@ show_iline_prefix(struct Client *sptr, struct ConfItem *aconf, char *name) *prefix_ptr++ = '^'; if(IsOper(sptr) && IsConfExemptLimits(aconf)) *prefix_ptr++ = '>'; - *prefix_ptr = '\0'; - strncpy(prefix_ptr, name, USERLEN); + rb_strlcpy(prefix_ptr, name, USERLEN + 1); return (prefix_of_host); }