mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 16:48:43 +00:00
Fixed bug FICORA #503685.
This commit is contained in:
parent
71ca77169d
commit
d600909da9
@ -312,6 +312,12 @@ ospf_rx_hook(sock *sk, int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int osize = ntohs(ps->length);
|
int osize = ntohs(ps->length);
|
||||||
|
if ((unsigned) osize < sizeof(struct ospf_packet))
|
||||||
|
{
|
||||||
|
log(L_ERR "%s%I - too low value in size field (%u bytes)", mesg, sk->faddr, osize);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if ((osize > size) || ((osize % 4) != 0))
|
if ((osize > size) || ((osize % 4) != 0))
|
||||||
{
|
{
|
||||||
log(L_ERR "%s%I - size field does not match (%d/%d)", mesg, sk->faddr, osize, size);
|
log(L_ERR "%s%I - size field does not match (%d/%d)", mesg, sk->faddr, osize, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user