summaryrefslogtreecommitdiff
path: root/src/nbt/read.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2023-12-15 23:16:47 -0500
committerFreya Murphy <freya@freyacat.org>2023-12-15 23:16:47 -0500
commitafda43984e84b6cf04bc72d5fea6551e5bd83c29 (patch)
treea70e643785c5fafadb6704e0145c22ba3948a3ad /src/nbt/read.c
parentfix text size (diff)
downloadnbtvis-afda43984e84b6cf04bc72d5fea6551e5bd83c29.tar.gz
nbtvis-afda43984e84b6cf04bc72d5fea6551e5bd83c29.tar.bz2
nbtvis-afda43984e84b6cf04bc72d5fea6551e5bd83c29.zip
dont allow empty compound key names
Diffstat (limited to '')
-rw-r--r--src/nbt/read.c5
1 files changed, 5 insertions, 0 deletions
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;