aboutsummaryrefslogtreecommitdiff
path: root/print-eigrp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-04-28 14:38:52 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-04-28 14:38:52 +0200
commite150c713a2ea333e9ab173e062b447dd65c9a4ee (patch)
tree42b3357903006977506c821b86da8a98824e8016 /print-eigrp.c
parent82b7266487d9e7aab2faef90f13de63f7f259ffe (diff)
downloadtcpdump-e150c713a2ea333e9ab173e062b447dd65c9a4ee.tar.gz
EIGRP: Add two missing bounds checks
Diffstat (limited to 'print-eigrp.c')
-rw-r--r--print-eigrp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/print-eigrp.c b/print-eigrp.c
index 5c975552..ea48a0ad 100644
--- a/print-eigrp.c
+++ b/print-eigrp.c
@@ -357,6 +357,7 @@ eigrp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
}
byte_length = (bit_length + 7) / 8; /* variable length encoding */
memset(prefix, 0, 4);
+ ND_TCHECK_LEN(tlv_ptr.eigrp_tlv_ip_int->destination, byte_length);
memcpy(prefix, tlv_ptr.eigrp_tlv_ip_int->destination, byte_length);
ND_PRINT("\n\t IPv4 prefix: %15s/%u, nexthop: ",
@@ -392,6 +393,7 @@ eigrp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
}
byte_length = (bit_length + 7) / 8; /* variable length encoding */
memset(prefix, 0, 4);
+ ND_TCHECK_LEN(tlv_ptr.eigrp_tlv_ip_ext->destination, byte_length);
memcpy(prefix, tlv_ptr.eigrp_tlv_ip_ext->destination, byte_length);
ND_PRINT("\n\t IPv4 prefix: %15s/%u, nexthop: ",