aboutsummaryrefslogtreecommitdiff
path: root/common/md5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/md5.cpp')
-rw-r--r--common/md5.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/md5.cpp b/common/md5.cpp
index 78d844a706..41a261bc88 100644
--- a/common/md5.cpp
+++ b/common/md5.cpp
@@ -247,6 +247,10 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length) {
return false;
}
+#ifdef DISABLE_MD5
+ memset(digest, 0, 16);
+#else
+
if (!restricted || sizeof(buf) <= length)
readlen = sizeof(buf);
else
@@ -266,6 +270,7 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length) {
}
md5_finish(&ctx, digest);
+#endif
return true;
}