summaryrefslogtreecommitdiff
path: root/lib/isc/md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc/md5.c')
-rw-r--r--lib/isc/md5.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/isc/md5.c b/lib/isc/md5.c
index 579d61c20b2a2..55d56195f48e4 100644
--- a/lib/isc/md5.c
+++ b/lib/isc/md5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -57,6 +57,8 @@ isc_md5_invalidate(isc_md5_t *ctx) {
void
isc_md5_update(isc_md5_t *ctx, const unsigned char *buf, unsigned int len) {
+ if (len == 0U)
+ return;
RUNTIME_CHECK(EVP_DigestUpdate(ctx,
(const void *) buf,
(size_t) len) == 1);