]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3398] tests fail with core dump
authorJuergen Perlinger <perlinger@ntp.org>
Sun, 20 Aug 2017 05:49:58 +0000 (07:49 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Sun, 20 Aug 2017 05:49:58 +0000 (07:49 +0200)
bk: 59992306oCj661XuGtYQGGcgQ4c76Q

ChangeLog
sntp/tests/packetProcessing.c

index a1a1cfae45a59975bb12958d206f6c0a48e631b5..9a7c04747a91888ed5d41a433dac097ca8209653 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+---
+* [Bug 3398] tests fail with core dump <perlinger@ntp.org>
+  - patch contributed by Alexander Bluhm
+
 ---
 (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn <stenn@ntp.org>
 (4.2.8p10)
index 660b5b6e20f15916fbb6a77046d99899a7c609c6..1a91bc81c1d995a71f4d90162bd7d5020b092eed 100644 (file)
@@ -76,7 +76,7 @@ PrepareAuthenticationTest(
        key_ptr->next = NULL;
        key_ptr->key_id = key_id;
        key_ptr->key_len = key_len;
-       memcpy(key_ptr->type, "MD5", 3);
+       strlcpy(key_ptr->type, "MD5", sizeof(key_ptr->type));
 
        TEST_ASSERT_TRUE(key_len < sizeof(key_ptr->key_seq));