From bea5ccb05c9c161e0e57de0b6ec51858ae53653b Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Sat, 29 Jun 2019 21:51:16 +0200 Subject: IEEE 802.15.4: Use GET_LE64ADDR_STRING() macro to add bounds checks. This fixes a buffer over-read discovered by Shadow HUANG. --- print-802_15_4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'print-802_15_4.c') diff --git a/print-802_15_4.c b/print-802_15_4.c index 37f111bc..7e78e4a5 100644 --- a/print-802_15_4.c +++ b/print-802_15_4.c @@ -543,7 +543,7 @@ ieee802_15_4_print_addr(netdissect_options *ndo, const u_char *p, ND_PRINT("%04x", GET_LE_U_2(p)); break; case 8: - ND_PRINT("%s", le64addr_string(ndo, p)); + ND_PRINT("%s", GET_LE64ADDR_STRING(p)); break; } return; @@ -1575,7 +1575,7 @@ ieee802_15_4_print_aux_sec_header(netdissect_options *ndo, return -1; } if (ndo->ndo_vflag > 1) { - ND_PRINT("KeySource %s, ", le64addr_string(ndo, p)); + ND_PRINT("KeySource %s, ", GET_LE64ADDR_STRING(p)); } p += 4; caplen -= 4; -- cgit v1.2.1