From dfe7a0adee150bb00b611c48b50d3e928f27222f Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 30 Apr 2020 08:44:49 +0200 Subject: NBT: Dynamic list-max-count protection. (#4697) --- src/WorldStorage/FastNBT.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/WorldStorage/FastNBT.h') diff --git a/src/WorldStorage/FastNBT.h b/src/WorldStorage/FastNBT.h index 0185a49ec..1f11ec7f3 100644 --- a/src/WorldStorage/FastNBT.h +++ b/src/WorldStorage/FastNBT.h @@ -307,6 +307,10 @@ protected: eNBTParseError ReadCompound(void); // Reads the latest tag as a compound eNBTParseError ReadList(eTagType a_ChildrenType); // Reads the latest tag as a list of items of type a_ChildrenType eNBTParseError ReadTag(void); // Reads the latest tag, depending on its m_Type setting + + /** Returns the minimum size, in bytes, of the specified tag type. + Used for sanity-checking. */ + static size_t GetMinTagSize(eTagType a_TagType); } ; -- cgit v1.2.3