From: Juergen Perlinger Date: Sun, 20 Aug 2017 05:49:58 +0000 (+0200) Subject: [Bug 3398] tests fail with core dump X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fc7fb52cba0138733f6b62a376a8007b30dfdea;p=thirdparty%2Fntp.git [Bug 3398] tests fail with core dump bk: 59992306oCj661XuGtYQGGcgQ4c76Q --- diff --git a/ChangeLog b/ChangeLog index a1a1cfae4..9a7c04747 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +--- +* [Bug 3398] tests fail with core dump + - patch contributed by Alexander Bluhm + --- (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn (4.2.8p10) diff --git a/sntp/tests/packetProcessing.c b/sntp/tests/packetProcessing.c index 660b5b6e2..1a91bc81c 100644 --- a/sntp/tests/packetProcessing.c +++ b/sntp/tests/packetProcessing.c @@ -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));