From: James Jones Date: Mon, 29 Aug 2022 17:37:27 +0000 (-0500) Subject: Correct print_hex_data() parameters in fr_vmps_print_hex() (#4700) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95a4db7220e000811857b8c81ed7d3fec001c35d;p=thirdparty%2Ffreeradius-server.git Correct print_hex_data() parameters in fr_vmps_print_hex() (#4700) For the loop printing the trailing portions of the packet to be correct, length must include the four-byte id and two-byte length as well as the following data. id and length are explicitly printed, so print_hex_data() would presumably show what follows, but that would start at attr + 6 and only be length - 6 bytes. --- diff --git a/src/protocols/vmps/vmps.c b/src/protocols/vmps/vmps.c index 7ca5692527d..770bd7fa402 100644 --- a/src/protocols/vmps/vmps.c +++ b/src/protocols/vmps/vmps.c @@ -494,7 +494,7 @@ void fr_vmps_print_hex(FILE *fp, uint8_t const *packet, size_t packet_len) fprintf(fp, "\t\t%08x %04x ", id, length); - print_hex_data(attr + 5, length, 3); + print_hex_data(attr + 6, length - 6, 3); } }