X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/f67e46a634dd3bdcefa9fc09dbef6baae1b1d1ed..0023eaa78f123676bfa9c5fba72ea4b8a59aaa70:/print-domain.c?ds=sidebyside diff --git a/print-domain.c b/print-domain.c index 7ac891f0..08d8460a 100644 --- a/print-domain.c +++ b/print-domain.c @@ -722,11 +722,10 @@ ns_rprint(netdissect_options *ndo, len = GET_BE_U_2(cp); cp += 2; - rp = cp + len; - ND_PRINT(" %s", tok2str(ns_type2str, "Type%u", typ)); - if (rp > ndo->ndo_snapend) - return(NULL); + + ND_TCHECK_LEN(cp, len); + rp = cp + len; switch (typ) { case T_A: @@ -896,6 +895,9 @@ ns_rprint(netdissect_options *ndo, } } return (rp); /* XXX This isn't always right */ + +trunc: + return(NULL); } void