diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2017-03-12 22:00:35 -0600 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2017-03-12 22:00:35 -0600 |
commit | 3ba62ef1de77153e5a8c7bad4451b96f6a1678b0 (patch) | |
tree | e6e69717e394a528a2e2aca3af036d4befaa9658 /zen/serialize.h | |
parent | 8.9 (diff) | |
download | FreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.tar.gz FreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.tar.bz2 FreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.zip |
8.10
Diffstat (limited to 'zen/serialize.h')
-rwxr-xr-x | zen/serialize.h | 1 |
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();
}
|