summaryrefslogtreecommitdiff
path: root/print-ppp.c
diff options
context:
space:
mode:
Diffstat (limited to 'print-ppp.c')
-rw-r--r--print-ppp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/print-ppp.c b/print-ppp.c
index 1f82e7da..a1b3214f 100644
--- a/print-ppp.c
+++ b/print-ppp.c
@@ -906,7 +906,7 @@ handle_chap(netdissect_options *ndo,
ND_PRINT("%02x", GET_U_1(p));
p++;
}
- name_size = len - (p - p0);
+ name_size = len - (u_int)(p - p0);
ND_PRINT(", Name ");
for (i = 0; i < name_size; i++) {
ND_TCHECK_1(p);
@@ -916,7 +916,7 @@ handle_chap(netdissect_options *ndo,
break;
case CHAP_SUCC:
case CHAP_FAIL:
- msg_size = len - (p - p0);
+ msg_size = len - (u_int)(p - p0);
ND_PRINT(", Msg ");
for (i = 0; i< msg_size; i++) {
ND_TCHECK_1(p);
@@ -1443,7 +1443,7 @@ ppp_hdlc(netdissect_options *ndo,
*/
se = ndo->ndo_snapend;
ndo->ndo_snapend = t;
- length = t - b;
+ length = ND_BYTES_AVAILABLE_AFTER(b);
/* now lets guess about the payload codepoint format */
if (length < 1)