eigrpd: Fix bit shift problem

Found this problem:
./eigrp_topo1.test_eigrp_topo1/r3/eigrpd.err:eigrpd/eigrp_packet.c:1113:35: runtime error: left shift of 192 by 24 places cannot be represented in type 'int'

Fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2024-05-23 06:59:39 -04:00
parent c8aa16ff61
commit 4675f3730e

View file

@ -1110,7 +1110,7 @@ struct TLV_IPv4_Internal_type *eigrp_read_ipv4_tlv(struct stream *s)
tlv->prefix_length = stream_getc(s);
destination_tmp = stream_getc(s) << 24;
destination_tmp = (uint32_t)stream_getc(s) << 24;
if (tlv->prefix_length > 8)
destination_tmp |= stream_getc(s) << 16;
if (tlv->prefix_length > 16)