1
0
mirror of https://github.com/bgp/bgpq4.git synced 2024-05-11 05:55:05 +00:00

The string returned by inet_ntoa() resides in a static memory area

This commit is contained in:
Job Snijders
2021-08-17 22:20:16 +00:00
parent 32a3520e62
commit 270e04dd23

View File

@ -1375,10 +1375,10 @@ bgpq4_print_ceacl(struct sx_radix_node *n, void *ff)
inet_ntoa(n->prefix->addr.addr));
}
if (wildmask.s_addr)
fprintf(f, "%s %s\n", inet_ntoa(mask),
inet_ntoa(wildmask));
else {
if (wildmask.s_addr) {
fprintf(f, "%s ", inet_ntoa(mask));
fprintf(f, "%s\n", inet_ntoa(wildmask));
} else {
fprintf(f, "host %s\n", inet_ntoa(mask));
}
} else {