mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 09:52:04 -04:00
parent
077f3c4e27
commit
acaa5bec31
2 changed files with 4 additions and 2 deletions
|
|
@ -1612,7 +1612,7 @@ dns_name_tofilenametext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
trem--;
|
||||
nlen--;
|
||||
} else {
|
||||
if (trem < 3)
|
||||
if (trem < 4)
|
||||
return (ISC_R_NOSPACE);
|
||||
snprintf(tdata, trem, "%%%02X", c);
|
||||
tdata += 3;
|
||||
|
|
|
|||
|
|
@ -1300,12 +1300,14 @@ dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx) {
|
|||
size += strlen(zone->db_argv[i]) + 1;
|
||||
mem = isc_mem_allocate(mctx, size);
|
||||
if (mem != NULL) {
|
||||
size_t remaining;
|
||||
tmp = mem;
|
||||
tmp2 = mem;
|
||||
tmp2 += (zone->db_argc + 1) * sizeof(char *);
|
||||
for (i = 0; i < zone->db_argc; i++) {
|
||||
remaining = (size_t)(mem - tmp2);
|
||||
*tmp++ = tmp2;
|
||||
strlcpy(tmp2, zone->db_argv[i], size);
|
||||
strlcpy(tmp2, zone->db_argv[i], remaining);
|
||||
tmp2 += strlen(tmp2) + 1;
|
||||
}
|
||||
*tmp = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue