summaryrefslogtreecommitdiff
path: root/zen/serialize.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2017-03-12 22:00:35 -0600
committerDaniel Wilhelm <shieldwed@outlook.com>2017-03-12 22:00:35 -0600
commit3ba62ef1de77153e5a8c7bad4451b96f6a1678b0 (patch)
treee6e69717e394a528a2e2aca3af036d4befaa9658 /zen/serialize.h
parent8.9 (diff)
downloadFreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.tar.gz
FreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.tar.bz2
FreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.zip
8.10
Diffstat (limited to 'zen/serialize.h')
-rwxr-xr-xzen/serialize.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/zen/serialize.h b/zen/serialize.h
index bb2f7a45..c8dfb96d 100755
--- a/zen/serialize.h
+++ b/zen/serialize.h
@@ -241,6 +241,7 @@ template <class BufferedInputStream> inline
void readArray(BufferedInputStream& stream, void* buffer, size_t len) //throw UnexpectedEndOfStreamError
{
const size_t bytesRead = stream.read(buffer, len);
+ assert(bytesRead <= len); //buffer overflow otherwise not always detected!
if (bytesRead < len)
throw UnexpectedEndOfStreamError();
}
bgstack15