From 6c7e61578b1b449272dbb40dd8b98d03dad8a57a Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Thu, 30 Jul 2020 10:01:36 -0400 Subject: [PATCH] [#117] Fixed gcc 10 compilation issues server/mdb6.c create_prefix6() - eliminated memcpy string overflow error --- RELNOTES | 5 +++++ server/mdb6.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/RELNOTES b/RELNOTES index 9d0a0414..6919dba7 100644 --- a/RELNOTES +++ b/RELNOTES @@ -35,6 +35,11 @@ ISC DHCP is open source software maintained by Internet Systems Consortium. This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). + Changes since 4.4.2 (Bug Fixes) + +- Minor corrections to allow compilation under gcc 10. + [Gitlab #117] + Changes since 4.4.2b1 (Bug Fixes) - Added a clarification on DHCPINFORMs and server authority to diff --git a/server/mdb6.c b/server/mdb6.c index da7baf6e..ebe01e56 100644 --- a/server/mdb6.c +++ b/server/mdb6.c @@ -1945,7 +1945,7 @@ create_prefix6(struct ipv6_pool *pool, struct iasubopt **pref, } new_ds.data = new_ds.buffer->data; memcpy(new_ds.buffer->data, ds.data, ds.len); - memcpy(new_ds.buffer->data + ds.len, &tmp, sizeof(tmp)); + memcpy(&new_ds.buffer->data[0] + ds.len, &tmp, sizeof(tmp)); data_string_forget(&ds, MDL); data_string_copy(&ds, &new_ds, MDL); data_string_forget(&new_ds, MDL); -- GitLab