From a839a8ae01585c9fd57a6bc47edddbdc442a9dfc Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Tue, 19 Nov 2019 12:11:28 +0100 Subject: [PATCH] And check the buffer size precisely. --- dns64/dns64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dns64/dns64.c b/dns64/dns64.c index 4b3c6cee5..1e38b8f0d 100644 --- a/dns64/dns64.c +++ b/dns64/dns64.c @@ -225,6 +225,7 @@ ipv4_to_ptr(uint32_t ipv4, char ptr[], size_t nm_len) static const char IPV4_PTR_SUFFIX[] = "\07in-addr\04arpa"; int i; char* c = ptr; + log_assert(nm_len == MAX_PTR_QNAME_IPV4); for (i = 0; i < 4; ++i) { *c = uitoa((unsigned int)(ipv4 % 256), c + 1);