summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc.c b/src/misc.c
index ac64d703..413d7d82 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -291,7 +291,7 @@ do_printhex (const char *text, const char *text2,
log_debug ("%*s ", (int)strlen(text), "");
}
}
- if (length)
+ if (length && buffer)
{
const unsigned char *p = buffer;
for (; length--; p++)