aboutsummaryrefslogtreecommitdiff
path: root/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'util.cpp')
-rw-r--r--util.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.cpp b/util.cpp
index 2b347e8c35..2fae9cc175 100644
--- a/util.cpp
+++ b/util.cpp
@@ -104,6 +104,9 @@ void hexdump(const byte * data, int len)
len -= 8;
}
+ if (len <= 0)
+ return;
+
for (i = 0; i < len; i++)
printf("%02x ", data[i]);
for (; i < 8; i++)