fix: potential NULL-dereference if buffer is corrupt.

This commit is contained in:
2026-01-23 12:40:46 +01:00
parent 5db8156824
commit ae2989b5eb

View File

@@ -215,6 +215,6 @@ const u8 *nbt_nexttag(const u8 *restrict buf)
tag = buf;
do {
tag = nexttag(tag, &dpt, lens, tags);
} while (dpt > 0);
} while (tag && dpt > 0);
return tag;
}