diff options
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 9a2b9e8..e29a9b4 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 */ |