From a8144cd98fdb08c1d942195f65fbc604f7bd3055 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Fri, 26 Feb 2021 20:25:48 +0100 Subject: [PATCH] skip parsing empty tags Credit to OSS-Fuzz --- src/irc/core/irc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index 96a09333..a5bd608b 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -433,6 +433,8 @@ GHashTable *irc_parse_message_tags(const char *tags) (GDestroyNotify) i_refstr_release, (GDestroyNotify) g_free); split = g_strsplit(tags, ";", -1); for (tmp = split; *tmp != NULL; tmp++) { + if (*tmp[0] == '\0') + continue; kv = g_strsplit(*tmp, "=", 2); unescape_tag(kv[1]); g_hash_table_replace(hash, i_refstr_intern(kv[0]),