epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c. Update their callers to include
<epan/show_exception.h> to get their declaration.
Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff. Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).
Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).
Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.
Use show_exception() to report non-fatal errors, rather than doing it
yourself.
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.
Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.
Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.
svn path=/trunk/; revision=47924
it's been used in an rtp_set_address() or srtp_set_address() call and,
if that Boolean is set, don't free the hash table; this fixes a case
where the hash table was freed while it was in use.
svn path=/trunk/; revision=47740
The issue was that hash tables were being accessed after they were freed from a "rejected answer".
The code was also too generous in considering many SIP status codes as "rejected answers", so now less SIP status codes are treated as "rejected answers" and are ignored by the transport API.
svn path=/trunk/; revision=47652
setup_sdp_transport_resend() should be unnecessary once all higher layers use setup_sdp_transport() and the "registration" code within dissect_sdp() is removed.
svn path=/trunk/; revision=47572
Added setup_sdp_transport() to allow higher layer protocols to call SDP with context to correctly setup an OFFER/ANSWER within SDP (which doesn't have its own transport layer). I attempted to keep backwards compatibility until all higher layer protocols set up OFFER/ANSWER context. If OFFER/ANSWER (request/response) can't be found (which would be the case for higher layer protocols without context), Wireshark should resort to the old behavior of applying SDP information as it sees packets.
This patch includes integration with SIP as it appears to have the most bug reports. Other higher layer protocols will be done later. Most are mentioned in bug 2368.
Fixes bug 2368 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2368) and all its duplicates
Fixes bug 2992 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2992) and all its duplicates
svn path=/trunk/; revision=47564
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().
Change some data types to avoid those implicit conversion warnings.
When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.
Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers. Cast
away those warnings in some cases where an API we don't control forces
us to do so.
Enable a bunch of additional warnings by default. Note why at least
some of the other warnings aren't enabled.
randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.
If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.
svn path=/trunk/; revision=46748
col_append_str(pinfo->cinfo, COL_INFO, ", with session description"); is redundant if some one has a different opinion fel free to revert.
svn path=/trunk/; revision=45428
Don't assume that we stored off the SPRT conversation port. This was code
comes from r43887/bug 3507 so no need to backport.
svn path=/trunk/; revision=44243
packet-sdp.c:
Init 'proto_sprt' in proto_reg_handof..()
[instead of using a registered init fcn];
packet-sprt.c:
Fix some typos;
Comment out dissect_sprt_heur() since it doesn't
really do any dissection. Add an XXX comment re same.
packet-v150fw.c:
Remove unused 'v150fw_handle' and thus unneeded proto_reg_handoff...();
Add an XXX comment re the (commented out) dissect_v150fw() not actually
doing any dissection.
svn path=/trunk/; revision=43902
SDP_CRYPTO: Give up (and display an expert info) if we don't find the colon
separating the key-method and the key-info.
Reindent this area of code a bit.
Remove tabs in some places for consistency.
svn path=/trunk/; revision=40771
1. If there's no character encoding (ENC_ASCII, ...) specified
then use ENC_ASCII.
2. For all but FT_UINT_STRING, always use ENC_NA
(replacing any existing True/1/FALSE/0
/ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).
svn path=/trunk/; revision=39426
FT_NONE
FT_BYTES
FT_IPV6
FT_IPXNET
FT_OID
Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN
svn path=/trunk/; revision=39260
Comment out two calls to tvb_)get_ephemeral_string since the result is never used: Coverity 1035;
Also:
Remove some unneeded #includes;
Use consistent indentation.
svn path=/trunk/; revision=36606
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys. (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)
svn path=/trunk/; revision=35224
- Don't list codecs which are deleted by using port 0.
- Use real concatenation i.s.o. reprint, which seems to fail in some circumstances.
svn path=/trunk/; revision=34154