From bfcde123380dbd0f5b30e53e92f409e8a10fc1fe Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 3 Jul 2022 08:58:32 +0200 Subject: [PATCH] Fix internal function convert_regular_ban() to actually use the buffer that it was provided. Duh! (bug introduced 2 days ago in 7371498ffdd336a9af9b648422f39444cfaf35cb) --- src/channel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/channel.c b/src/channel.c index bb928af58..97116a746 100644 --- a/src/channel.c +++ b/src/channel.c @@ -732,16 +732,16 @@ const char *convert_regular_ban(char *mask, char *buf, size_t buflen) { *host++ = '\0'; if (!user) - return make_nick_user_host(NULL, trim_str(mask,USERLEN), trim_str(host,HOSTLEN)); + return make_nick_user_host_r(buf, buflen, NULL, trim_str(mask,USERLEN), trim_str(host,HOSTLEN)); } else if (!user && (strchr(mask, '.') || strchr(mask, ':'))) { /* 1.2.3.4 -> *!*@1.2.3.4 (and the same for IPv6) */ - return make_nick_user_host(NULL, NULL, trim_str(mask,HOSTLEN)); + return make_nick_user_host_r(buf, buflen, NULL, NULL, trim_str(mask,HOSTLEN)); } /* regular nick!user@host with the auto-trimming feature */ - return make_nick_user_host(trim_str(mask,NICKLEN), trim_str(user,USERLEN), trim_str(host,HOSTLEN)); + return make_nick_user_host_r(buf, buflen, trim_str(mask,NICKLEN), trim_str(user,USERLEN), trim_str(host,HOSTLEN)); } /** Make a proper ban mask.