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-bootp.c | |
parent | 810711ec13a9424633df50e0a1af057a68e2ed45 (diff) |
Notes
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)); |