diff options
Diffstat (limited to 'src/libutil/hash.cc')
-rw-r--r-- | src/libutil/hash.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc index 599d375dca2f..cd7043090ec7 100644 --- a/src/libutil/hash.cc +++ b/src/libutil/hash.cc @@ -22,6 +22,7 @@ Hash::Hash(HashType type) else if (type == htSHA1) hashSize = sha1HashSize; else if (type == htSHA256) hashSize = sha256HashSize; else throw Error("unknown hash type"); + assert(hashSize <= maxHashSize); memset(hash, 0, hashSize); } |