summaryrefslogtreecommitdiff
path: root/core/crypto/hashing_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/crypto/hashing_context.cpp')
-rw-r--r--core/crypto/hashing_context.cpp1
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: