Skip to content
Snippets Groups Projects
Commit e7740026 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Inicialize memory for text address.

Refs #1696
parent c6497efc
No related branches found
No related tags found
No related merge requests found
......@@ -660,9 +660,12 @@ char *rdata_apl_to_string(knot_rdata_item_t item)
if (af != -1) {
char text_address[1024];
memset(text_address, 0, sizeof(text_address));
uint8_t address[128];
memset(address, 0, sizeof(address));
memcpy(address, data + 4, length);
/* Only valid data should be present here. */
assert((data + 4) - rdata_item_data(item) <= rdata_item_size(item));
ret = ret_base + strlen(ret);
if (inet_ntop(af, address,
text_address,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment