mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-21 07:10:43 -05:00
And check the buffer size precisely.
This commit is contained in:
parent
79a6e9fbe2
commit
a839a8ae01
1 changed files with 1 additions and 0 deletions
|
|
@ -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";
|
static const char IPV4_PTR_SUFFIX[] = "\07in-addr\04arpa";
|
||||||
int i;
|
int i;
|
||||||
char* c = ptr;
|
char* c = ptr;
|
||||||
|
log_assert(nm_len == MAX_PTR_QNAME_IPV4);
|
||||||
|
|
||||||
for (i = 0; i < 4; ++i) {
|
for (i = 0; i < 4; ++i) {
|
||||||
*c = uitoa((unsigned int)(ipv4 % 256), c + 1);
|
*c = uitoa((unsigned int)(ipv4 % 256), c + 1);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue