aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/ntp/tests/libntp/a_md5encrypt.c
diff options
context:
space:
mode:
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;