hirc

IRC client
Log | Files | Refs

commit 94f04846eb99066320f8199566229070db39a882
parent 9245cc5b6d102f0b92c3edb8af3778b9330b454d
Author: hhvn <dev@hhvn.uk>
Date:   Wed,  1 Dec 2021 23:04:11 +0000

handle.c: don't modify params in ISUPPORT

Diffstat:
Mhandle.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/handle.c b/handle.c @@ -286,7 +286,7 @@ handle_RPL_ISUPPORT(char *msg, char **params, struct Server *server, time_t time /* skip the last param ".... :are supported by this server" */ for (; *params && *(params+1); params++) { - key = *params; + key = strdup(*params); if ((value = strchr(key, '=')) != NULL) { *value = '\0'; if (*(value+1)) @@ -296,6 +296,7 @@ handle_RPL_ISUPPORT(char *msg, char **params, struct Server *server, time_t time } support_set(server, key, value); + free(key); } }