| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with a maximum length, where a string shorter than that length is padded
with NULs), as "fn_print()" won't handle the maximum length *and* the
snapshot length and "fn_printn()" won't stop on a null string. Use it
where appropriate.
Always pass "snapend" to "fn_print()" and "fn_printn()" if they're
passed a pointer into the packet data; only pass NULL if they're being
handed a pointer into a buffer that's not part of the packet data.
Always check the return value of "fn_print()", "fn_printn()", and
"fn_printzp()" if they're passed "snapend", and do the appropriate
string termination and "packet truncated" indication if they return 1.
|
|
|
|
| |
OpenBSD.
|
| |
|
|
|
|
|
|
|
| |
length; explicitly check against the snapshot length, instead.
In "asn1_parse()", always check against the length passed in before
fetching anything from the packet.
|
|
|
|
|
| |
is included if we compile with at least some Windows compilers, and
add a default case to "smi_check_a_range()".
|
|
|
|
| |
to kin1@sourceforge.net to finding this.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
to check the length of the community name before doing a length-limited
comparison.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
following problem:
According to the ASN.1 documents, OIDs of the form 2.100.3 are
correctly encoded as 0x0603813403. tcpdump fails to properly
decode them - it displays the value 4.20.3 instead of 2.100.3.
|
|
|
|
| |
update from John LoVerso.
|
|
|
|
| |
out of the range specified by the MIB.
|
|
|
|
| |
Message-Id: <200104231431.QAA25904@henkell.ibr.cs.tu-bs.de>
|
| |
|
| |
|
|
|
|
|
| |
requires the v2 API, so this attempt at compatibility just caused
problems.
|
| |
|
|
|
|
| |
(but didn't test it).
|
|
|
|
| |
Stolarchuk.
|
| |
|
|
|
|
|
| |
there seem to be couple of unsafe use of strcat and strcpy - we should
bring in strl{cat,cpy}.
|
|
|
|
|
|
|
|
|
|
|
| |
API.
* print-bgp.c: improve options printing. ugly code exists for
unaligned option parsing (need some fix).
* const poisoning in SMB decoder.
* make dump format back to original. someone may want to add an
option to do ascii printing, but keep the default behavior as is
for scripts used in many places.
* -Wall -Werror clean checks.
|
|
|
|
|
|
|
|
| |
Here is a new version of the libsmi patch for tcpdump. It provides
some bug fixes and some enhancements such as access checking and
better range checking. The patch also fixed a few bugs in the
print_snmp.c module of tcpdump itself (unrelated to the usage of
libsmi).
|
| |
|
| |
|
| |
|
| |
|
|
|