summaryrefslogtreecommitdiff
path: root/src/nbt/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nbt/read.c')
-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;