diff options
author | Freya Murphy <freya@freyacat.org> | 2023-12-15 23:16:47 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2023-12-15 23:16:47 -0500 |
commit | afda43984e84b6cf04bc72d5fea6551e5bd83c29 (patch) | |
tree | a70e643785c5fafadb6704e0145c22ba3948a3ad /src/nbt/read.c | |
parent | fix text size (diff) | |
download | nbtvis-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.c | 5 |
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; |