diff options
Diffstat (limited to 'print-bootp.c')
-rw-r--r-- | print-bootp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/print-bootp.c b/print-bootp.c index d87911fdb206..c076f4250756 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -358,7 +358,7 @@ bootp_print(netdissect_options *ndo, if (*bp->bp_sname) { ND_PRINT((ndo, "\n\t sname \"")); if (fn_printztn(ndo, bp->bp_sname, (u_int)sizeof bp->bp_sname, - ndo->ndo_snapend)) { + ndo->ndo_snapend) == 0) { ND_PRINT((ndo, "\"")); ND_PRINT((ndo, "%s", tstr + 1)); return; @@ -369,7 +369,7 @@ bootp_print(netdissect_options *ndo, if (*bp->bp_file) { ND_PRINT((ndo, "\n\t file \"")); if (fn_printztn(ndo, bp->bp_file, (u_int)sizeof bp->bp_file, - ndo->ndo_snapend)) { + ndo->ndo_snapend) == 0) { ND_PRINT((ndo, "\"")); ND_PRINT((ndo, "%s", tstr + 1)); return; @@ -378,7 +378,7 @@ bootp_print(netdissect_options *ndo, } /* Decode the vendor buffer */ - ND_TCHECK(bp->bp_vend[0]); + ND_TCHECK2(bp->bp_vend[0], 4); if (memcmp((const char *)bp->bp_vend, vm_rfc1048, sizeof(uint32_t)) == 0) rfc1048_print(ndo, bp->bp_vend); @@ -388,6 +388,7 @@ bootp_print(netdissect_options *ndo, else { uint32_t ul; + ND_TCHECK_32BITS(&bp->bp_vend); ul = EXTRACT_32BITS(&bp->bp_vend); if (ul != 0) ND_PRINT((ndo, "\n\t Vendor-#0x%x", ul)); |