summaryrefslogtreecommitdiff
path: root/contrib/ntp/tests/libntp/a_md5encrypt.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2016-12-22 16:19:05 +0000
committerXin LI <delphij@FreeBSD.org>2016-12-22 16:19:05 +0000
commit2a3488342441b3296995c8a9eca705a468d0eff0 (patch)
tree0ddd6422cb1fb658884e045a0527f7a24e4df58e /contrib/ntp/tests/libntp/a_md5encrypt.c
parent59570923bc07f0e74f90b47bd0e10dc5db508d4a (diff)
Notes
Diffstat (limited to 'contrib/ntp/tests/libntp/a_md5encrypt.c')
-rw-r--r--contrib/ntp/tests/libntp/a_md5encrypt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/ntp/tests/libntp/a_md5encrypt.c b/contrib/ntp/tests/libntp/a_md5encrypt.c
index d8e7ab93e1ff..a87aa796de72 100644
--- a/contrib/ntp/tests/libntp/a_md5encrypt.c
+++ b/contrib/ntp/tests/libntp/a_md5encrypt.c
@@ -49,9 +49,7 @@ test_Encrypt(void) {
u_int32 *packetPtr;
int length;
- packetPtr = emalloc(totalLength * sizeof(*packetPtr));
-
- memset(packetPtr + packetLength, 0, keyIdLength);
+ packetPtr = emalloc_zero(totalLength * sizeof(*packetPtr));
memcpy(packetPtr, packet, packetLength);
cache_secretsize = keyLength;