summaryrefslogtreecommitdiff
path: root/print-telnet.c
Commit message (Collapse)AuthorAgeFilesLines
* CVE-2017-12988/TELNET: Add a missing bounds check.Guy Harris2017-09-131-0/+1
| | | | | | | This fixes a buffer over-read discovered by Forcepoint's security researchers Otto Airamo & Antti Levomäki. Add a test using the capture file supplied by the reporter(s).
* Telnet: Add a bounds checkFrancois-Xavier Le Bail2016-10-121-0/+1
|
* Telnet: Add some bounds checksFrancois-Xavier Le Bail2016-10-091-1/+8
| | | | Add and use tstr[].
* Declare some variables as staticFrancois-Xavier Le Bail2016-09-111-2/+2
|
* Move the printer summaries from INSTALL.txt to each printerFrancois-Xavier Le Bail2016-08-141-0/+2
| | | | | | | | with the tag '\summary:' for greping. Remark: Currently some printers have no summary line. Moreover: Summarize all printers with a single line in INSTALL.txt
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-101-1/+1
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* Printers must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-051-1/+1
|
* dismiss NETDISSECT_REWORKED macroDenis Ovsienko2015-03-221-1/+0
| | | | | | | The purpose of this macro was to enable the file-by-file switch to NDO, after which only tcpdump.c had a use of it and the definitions guarded by it. Update tcpdump.c not to require them any more and dismiss the unused definitions.
* Add a comment explaining what the first telnet_parse() call does.Guy Harris2014-10-191-0/+4
|
* No need to check for -q in the Telnet dissector.Guy Harris2014-10-191-5/+0
| | | | | If -q is used, the TCP dissector won't call subdissectors, so the Telnet dissector won't even get called.
* Print *something* for Telnet regardless of the -q/-v flags.Guy Harris2014-10-191-0/+5
| | | | | For -q, just print "[telnet]". Without -v, at least print the negotiation.
* NDOize OpenFlow, IEEE slow and telnet decodersDenis Ovsienko2014-03-171-28/+27
|
* print-telnet: variable 'length' is updated and the new value is never usedFrancois-Xavier Le Bail2014-03-071-1/+0
|
* don't include addrtoname.h needlesslyDenis Ovsienko2014-02-251-1/+0
|
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdumpMichael Richardson2014-01-011-1/+285
|\ | | | | | | | | Conflicts: enc.h
| * Pull a bunch of headers into the only source file that includes them.Guy Harris2013-12-301-1/+285
| | | | | | | | | | | | For headers included in only one source file, put the header contents in the source file in question, and get rid of a bunch of stuff from the header not used in the source file.
* | ndo-ize print-ascii: hex_print_with_offset()Michael Richardson2014-01-011-1/+1
|/
* pass on ident string to hex_print()hannes2003-12-291-2/+2
|
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-4/+4
| | | | | | | | | | appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
* From Neil Spring:guy2003-11-151-4/+4
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Neil T. Spring: fixes for many of those warnings: addrtoname.c, configure.in: Linux needs netinet/ether.h for ether_ntohost print-*.c: change char *foo = "bar" to const char *foo = "bar" to appease -Wwrite-strings; should affect no run-time behavior. print-*.c: make some variables unsigned. print-bgp.c: plen ('prefix len') is unsigned, no reason to validate by comparing to zero. print-cnfp.c, print-rx.c: use intoa, provided by addrtoname, instead of inet_ntoa. print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to be false, so check for (u_int)-1, which represents failure, explicitly. print-isakmp.c: complete initialization of attrmap objects. print-lwres.c: "if(x); print foo;" seemed much more likely to be intended to be "if(x) { print foo; }". print-smb.c: complete initialization of some structures. In addition, add some fixes for the signed vs. unsigned comparison warnings: extract.h: cast the result of the byte-extraction-and-combining, as, at least for the 16-bit version, C's integral promotions will turn "u_int16_t" into "int" if there are other "int"s nearby. print-*.c: make some more variables unsigned, or add casts to an unsigned type of signed values known not to be negative, or add casts to "int" of unsigned values known to fit in an "int", and make other changes needed to handle the aforementioned variables now being unsigned. print-isakmp.c: clean up the handling of error/status indicators in notify messages. print-ppp.c: get rid of a check that an unsigned quantity is >= 0. print-radius.c: clean up some of the bounds checking. print-smb.c: extract the word count into a "u_int" to avoid the aforementioned problems with C's integral promotions. print-snmp.c: change a check that an unsigned variable is >= 0 to a check that it's != 0. Also, fix some formats to use "%u" rather than "%d" for unsigned quantities.
* Added support for Win32, based on WinPcap.risso2002-08-011-8/+2
|
* whitespace cleanupitojun2002-06-111-5/+5
|
* Fix truncation checks. It checked the TCP packet length but not thefenner2001-09-101-14/+11
| | | | | | amount captured. It won't overrun random data after the packet unless it's formatted like a known telnet option, so this is very unlikely to be exploitable.
* copy <arpa/telnet.h> from netbsd, into "telnet.h"itojun2001-06-261-8/+4
|
* improve ENCRYPT and AUTHENTICATION telnet negotiation printing.itojun2001-06-261-17/+73
|
* do not print anything if it is not a valid IAC xx sequenceitojun2001-06-251-4/+2
|
* cleanup/correct telnet option printing.itojun2001-06-251-86/+124
|
* avoid strcpyitojun2001-06-151-2/+2
|
* Get rid of includes of <netinet/in_systm.h>, and replace "n_short",guy2000-09-291-2/+1
| | | | "n_long", and "n_time", defined in that file, with other types.
* Add an "ip.h" header, to declare the IP stuff needed by dissectors, andguy2000-09-231-3/+1
| | | | | | | | | | | have dissectors include them rather than <netinet/ip.h> or <netinet/ip_var.h>, if they actually need that stuff. Put the declarations of the ICMP stuff directly into "print-icmp.c". Remove all unnecessary includes of <netinet/ip*.h> files. Copy the byte-order stuff from "nameser.h" into "tcp.h".
* Add "tcp.h" and "udp.h" headers, to declare the TCP and UDP stuff neededguy2000-09-231-2/+1
| | | | | | | | | by dissectors, and have dissectors include them rather than <netinet/udp.h>, <netinet/udp_var.h>, or <netinet/tcp.h>, if they actually need that stuff. Remove all unnecessary includes of <netinet/udp*.h> or <netinet/tcp*.h> files.
* remove non-STDC codeassar2000-07-011-3/+1
|
* avoid possible infinite loop in relts_print().itojun2000-06-031-17/+1
| | | | | move safeputchar() and safeputs() into util.c for better code sharing. some style.
* do not attempt to telnet option chars directly - they usually includeitojun2000-05-281-5/+23
| | | | | binaries like \001 or \200, and damages screen output. improve safeputc() - print 0x80 and beyond in \xxx.
* s/sprintf/snprintf/.itojun2000-01-171-6/+7
| | | | | there seem to be couple of unsafe use of strcat and strcpy - we should bring in strl{cat,cpy}.
* Unify rcsid[]'s.fenner2000-01-091-6/+2
|
* remove <netinet/tcpip.h>. including this header causes errors withassar2000-01-091-1/+0
| | | | Kame V6 stack and nothing from it was used anyway.
* <sys/cdefs.h>: conditionalizeassar2000-01-071-0/+2
|
* comment out __RCSID (netbsd only).itojun1999-12-231-0/+2
|
* add print-ascii.c and print-telnet.c from netbsd.itojun1999-12-221-0/+191
- add -X option for ascii printing. - telnet command sequences (ff xx xx) will be dumped with -vvv -X.