mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
[master] check ECS address length
This commit is contained in:
parent
d401f4a4d8
commit
1330ae5fc2
@ -3252,6 +3252,9 @@ render_ecs(isc_buffer_t *ecsbuf, isc_buffer_t *target) {
|
|||||||
if (isc_buffer_remaininglength(ecsbuf) < addrbytes)
|
if (isc_buffer_remaininglength(ecsbuf) < addrbytes)
|
||||||
return (DNS_R_OPTERR);
|
return (DNS_R_OPTERR);
|
||||||
|
|
||||||
|
if (addrbytes > sizeof(addr))
|
||||||
|
return (DNS_R_OPTERR);
|
||||||
|
|
||||||
ADD_STRING(target, ": ");
|
ADD_STRING(target, ": ");
|
||||||
memset(addr, 0, sizeof(addr));
|
memset(addr, 0, sizeof(addr));
|
||||||
for (i = 0; i < addrbytes; i ++)
|
for (i = 0; i < addrbytes; i ++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user