X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c6c5a49626fcc648f7a5e5a26b7b6a93ff939b25..1f563c19e77e7be5e1a2e3b6336d0475d7530f61:/print-ospf.c diff --git a/print-ospf.c b/print-ospf.c index e6bebed3..7aa00d39 100644 --- a/print-ospf.c +++ b/print-ospf.c @@ -1067,7 +1067,8 @@ ospf_decode_v2(netdissect_options *ndo, case OSPF_TYPE_LS_ACK: lshp = op->ospf_lsa.lsa_lshdr; - while (ospf_print_lshdr(ndo, lshp) != -1) { + while ((const u_char *)lshp < dataend) { + ospf_print_lshdr(ndo, lshp); ++lshp; } break;