X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/111ff8a61dd320445f1d5167559cf65bfc2c26ca..d511b994b9931460771dc56c70b791204178d157:/print-telnet.c?ds=sidebyside diff --git a/print-telnet.c b/print-telnet.c index 308e9248..bf2f1719 100644 --- a/print-telnet.c +++ b/print-telnet.c @@ -50,20 +50,14 @@ #endif #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.19 2002-06-11 17:08:57 itojun Exp $"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.23 2003-11-16 09:36:39 guy Exp $"; #endif -#include -#include -#include -#include - -#include +#include #include #include -#include #include #include "interface.h" @@ -115,7 +109,8 @@ numstr(int x) static int telnet_parse(const u_char *sp, u_int length, int print) { - int i, c, x; + int i, x; + u_int c; const u_char *osp, *p; #define FETCH(c, sp, length) \ do { \ @@ -161,7 +156,7 @@ telnet_parse(const u_char *sp, u_int length, int print) break; /* IAC SB .... IAC SE */ p = sp; - while (length > p + 1 - sp) { + while (length > (u_int)(p + 1 - sp)) { if (p[0] == IAC && p[1] == SE) break; p++;