diff options
author | Rafał Mikrut <mikrutrafal54@gmail.com> | 2019-10-28 08:07:29 +0100 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal54@gmail.com> | 2019-10-28 08:07:29 +0100 |
commit | e53e1c566ac9e2e9b829f1cdbfd5d27537053cd1 (patch) | |
tree | 76cbb7b71e5da369511c6803926e33cbec858715 /core/crypto | |
parent | 4ecc30cc5ed04c770efd79c2c9f2b1dc9ae0af39 (diff) |
Fix some crashes and using null pointers
Diffstat (limited to 'core/crypto')
-rw-r--r-- | core/crypto/hashing_context.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/crypto/hashing_context.cpp b/core/crypto/hashing_context.cpp index bd863f546b..b5aa0ddc18 100644 --- a/core/crypto/hashing_context.cpp +++ b/core/crypto/hashing_context.cpp @@ -50,6 +50,7 @@ Error HashingContext::start(HashType p_type) { Error HashingContext::update(PoolByteArray p_chunk) { ERR_FAIL_COND_V(ctx == NULL, ERR_UNCONFIGURED); size_t len = p_chunk.size(); + ERR_FAIL_COND_V(len == 0, FAILED); PoolByteArray::Read r = p_chunk.read(); switch (type) { case HASH_MD5: |