diff options
author | tycho <work.tycho@gmail.com> | 2015-12-18 12:08:55 +0100 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-12-18 12:08:55 +0100 |
commit | 9e6161305da8ca2a241b94edf51bc1e74313338c (patch) | |
tree | 3c5d2390c152773bc04e34617f59e5f50c00ef31 /src/WorldStorage/FastNBT.cpp | |
parent | Merge pull request #2755 from cuberite/coverage (diff) | |
download | cuberite-9e6161305da8ca2a241b94edf51bc1e74313338c.tar cuberite-9e6161305da8ca2a241b94edf51bc1e74313338c.tar.gz cuberite-9e6161305da8ca2a241b94edf51bc1e74313338c.tar.bz2 cuberite-9e6161305da8ca2a241b94edf51bc1e74313338c.tar.lz cuberite-9e6161305da8ca2a241b94edf51bc1e74313338c.tar.xz cuberite-9e6161305da8ca2a241b94edf51bc1e74313338c.tar.zst cuberite-9e6161305da8ca2a241b94edf51bc1e74313338c.zip |
Diffstat (limited to 'src/WorldStorage/FastNBT.cpp')
-rw-r--r-- | src/WorldStorage/FastNBT.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/WorldStorage/FastNBT.cpp b/src/WorldStorage/FastNBT.cpp index 35c3ace0b..70570f7d0 100644 --- a/src/WorldStorage/FastNBT.cpp +++ b/src/WorldStorage/FastNBT.cpp @@ -91,11 +91,7 @@ bool cParsedNBT::ReadString(size_t & a_StringStart, size_t & a_StringLen) NEEDBYTES(2); a_StringStart = m_Pos + 2; a_StringLen = static_cast<size_t>(GetBEShort(m_Data + m_Pos)); - if (a_StringLen > 0xffff) - { - // Suspicious string length - return false; - } + NEEDBYTES(a_StringLen); m_Pos += 2 + a_StringLen; return true; } |