diff options
Diffstat (limited to 'ospfd/ospf_packet.c')
| -rw-r--r-- | ospfd/ospf_packet.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 466b5fa2a2..8c87a568c0 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -1716,6 +1716,12 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,  			break;  		} +		if (length < OSPF_LSA_HEADER_SIZE) { +			flog_warn(EC_OSPF_PACKET, +				  "Link State Update: LSA length too small."); +			break; +		} +  		/* Validate the LSA's LS checksum. */  		sum = lsah->checksum;  		if (!ospf_lsa_checksum_valid(lsah)) {  | 
