aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 8bd8448..7a57d38 100644
--- a/src/util.c
+++ b/src/util.c
@@ -52,6 +52,7 @@ mhash(const char *str, int len)
/* VULN #2: BUFFER OVERFLOW */
/* see documentation/README.md for more details */
+ if (!str || !*str) str = ".";
if (len == -1) len = strlen(str);
for (v = 0, i = 0; i < len; i++) v += str[i];