From: W.C.A. Wijngaards Date: Thu, 17 Aug 2023 13:22:54 +0000 (+0200) Subject: - Fix regional_alloc_init for potential unaligned source of the copy. X-Git-Tag: release-1.18.0rc1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4844fa3481cbe67189568a0160f06ce99acbaafa;p=thirdparty%2Funbound.git - Fix regional_alloc_init for potential unaligned source of the copy. --- diff --git a/doc/Changelog b/doc/Changelog index bf23a003c..285341417 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -9,6 +9,7 @@ `queries_cookie_valid` and `queries_cookie_client` and `queries_cookie_invalid` information. The `ip\-ratelimit\-cookie:` value determines a rate limit for queries with cookies, if desired. + - Fix regional_alloc_init for potential unaligned source of the copy. 2 August 2023: George - Move a cache reply callback in worker.c closer to the cache reply diff --git a/util/regional.c b/util/regional.c index 93e911c5e..44aee68b2 100644 --- a/util/regional.c +++ b/util/regional.c @@ -186,7 +186,7 @@ regional_alloc_init(struct regional* r, const void *init, size_t size) { void *s = regional_alloc(r, size); if(!s) return NULL; - memcpy(s, init, size); + memmove(s, init, size); return s; }