From afda43984e84b6cf04bc72d5fea6551e5bd83c29 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 15 Dec 2023 23:16:47 -0500 Subject: dont allow empty compound key names --- src/nbt/read.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nbt/read.c') diff --git a/src/nbt/read.c b/src/nbt/read.c index d5dd827..cef04ca 100644 --- a/src/nbt/read.c +++ b/src/nbt/read.c @@ -131,6 +131,11 @@ static bool nbt_read_compound(tagdata_t *data, const stream_t *stream) { return false; } + if (tag.name_len < 1) { + free(tags); + return false; + } + if (tag.type == TAG_END) break; -- cgit v1.2.3-freya