diff options
author | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:36:53 +0000 |
---|---|---|
committer | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:36:53 +0000 |
commit | f91036a44a189fa5d0b5f1c6dea0a396a0f928c0 (patch) | |
tree | 2cd0554d9f0826a4e0bc63c5e4ca83ece65bee24 /print-domain.c | |
parent | 810711ec13a9424633df50e0a1af057a68e2ed45 (diff) |
Notes
Diffstat (limited to 'print-domain.c')
-rw-r--r-- | print-domain.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/print-domain.c b/print-domain.c index 9a2b9e85687b6..e29a9b4b0f9be 100644 --- a/print-domain.c +++ b/print-domain.c @@ -582,6 +582,13 @@ ns_print(netdissect_options *ndo, register const u_char *cp; uint16_t b2; + if(length < sizeof(*np)) { + ND_PRINT((ndo, "domain")); + ND_PRINT((ndo, " [length %u < %zu]", length, sizeof(*np))); + ND_PRINT((ndo, " (invalid)")); + return; + } + np = (const HEADER *)bp; ND_TCHECK(*np); /* get the byte-order right */ |