Commit Graph

218 Commits

Author SHA1 Message Date
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Evan Huus b5900e53d9 Make sure our ldap_call_response_t struct is always completely initialized,
fixing a "Conditional jump or move depends on uninitialised value" error found
by valgrind fuzzing.

svn path=/trunk/; revision=51516
2013-08-25 17:31:15 +00:00
Jakub Zawadzki 9cfac1227d Replace hfinfo pointer to same_name_prev, with same_name_prev_id.
svn path=/trunk/; revision=51175
2013-08-06 20:53:47 +00:00
Evan Huus 7c8530539c Ldap still needs to include wmem.h since it uses wmem during normal dissection,
just not for UAT purposes.

svn path=/trunk/; revision=50074
2013-06-20 14:01:54 +00:00
Evan Huus d63bd5330f Back out some of the wmem conversions (r50063 and r50057).
These dissectors allocate ephemeral or seasonal memory in UAT callbacks, which
really makes no sense because UAT callbacks can occur when there is no packet or
file in scope, making this effectively a leak if the user is fiddling with their
UAT and never opens a capture.

Emem let you get away with this, wmem forces an assertion. Back out the changes
so that the UATs are usable until the code can be properly fixed to not use
out-of-scope allocators.

svn path=/trunk/; revision=50073
2013-06-20 06:26:03 +00:00
Evan Huus 8b0f1addd9 Apparently one of our major global headers must include emem.h, because I just
found a bunch more asn1 dissectors using emem without ever directly including
the header. Convert those to wmem as well, which involves add a number of
#include directives since dissectors do *not* automatically pull in the wmem
headers.

svn path=/trunk/; revision=50066
2013-06-19 23:08:58 +00:00
Evan Huus b1e12ec925 Convert the rest of the ASN1 dissectors from emem to wmem.
svn path=/trunk/; revision=50063
2013-06-19 22:47:36 +00:00
Michael Mann 7fe5422c4b Convert ASN.1 dissectors to use filterable expert info.
NOTE: Kerberos ASN.1 template was updated, but not generated to source.

svn path=/trunk/; revision=49707
2013-06-03 03:42:36 +00:00
Pascal Quantin 0ee4d0a00a Postfix FT_NONE fields with "_element" string to reduce number of incompatible filters in ASN.1 dissectors
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402

svn path=/trunk/; revision=49599
2013-05-27 20:26:49 +00:00
Pascal Quantin a37c044203 Update the ASN.1 based dissectors following the changes done in r48812
svn path=/trunk/; revision=48820
2013-04-11 18:14:53 +00:00
Bill Meier 1f083fd654 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachments #10423,#10424

svn path=/trunk/; revision=48450
2013-03-21 14:29:58 +00:00
Guy Harris c522bb09c2 The LDAP dissector uses register_frame_end_routine(), so it needs to
include packet-frame.h.

svn path=/trunk/; revision=47928
2013-02-28 00:09:26 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
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
2013-02-27 22:43:54 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier d449c31d1d its ==> it's & it's ==> its as needed.
svn path=/trunk/; revision=47892
2013-02-26 01:22:18 +00:00
Guy Harris 29715ccc8f How can I get a new tvbuff that starts at an offset within a given
tvbuff and runs to the end of the tvbuff?  Let me count the ways....

Replace a bunch of different ways of doing that (some incorrect, in that
they're not properly handling tvbuffs where the captured and reported
lengths are different) with tvb_new_subset_remaining().

svn path=/trunk/; revision=47751
2013-02-19 23:17:07 +00:00
Jakub Zawadzki 7a9d27c33f Regenerate asn.1 dissectors.
svn path=/trunk/; revision=45110
2012-09-24 19:38:46 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5ad3e5331e MT: move global frame_end_routines to packet_info.
svn path=/trunk/; revision=44748
2012-09-03 12:00:40 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman a0910557c7 Get rid of a couple of warnings.
svn path=/trunk/; revision=43064
2012-06-04 12:20:37 +00:00
Anders Broman 10fe76d8a0 Get rid of a couple of warnings.
svn path=/trunk/; revision=43057
2012-06-04 08:56:48 +00:00
Ronnie Sahlberg 4baba1c684 Sometimes you might have plaintext LDAP for a SASL LDAP connection if the handshake never occured.
Observed with exchange in some configurations.

From Matthieu Patou <mat@matws.net>


svn path=/trunk/; revision=42875
2012-05-28 09:40:54 +00:00
Alexis La Goutte 7e0c1e3a5a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=42514
2012-05-08 17:42:54 +00:00
Guy Harris 1fca484224 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

Update the RFC number for LDAP.

svn path=/trunk/; revision=42493
2012-05-08 00:15:53 +00:00
Chris Maynard d1c1455efc Fix Coverity CID 280809 (formerly CID 809): Uninitialized scalar variable.
svn path=/trunk/; revision=42399
2012-05-03 14:51:36 +00:00
Jakub Zawadzki 57bde6a54f Fix #7056 + Remove mechanism global, unused variable.
svn path=/trunk/; revision=42008
2012-04-10 15:48:26 +00:00
Anders Broman 7135c935cd Propagate http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=42005 to template file.
svn path=/trunk/; revision=42006
2012-04-10 13:21:35 +00:00
Jakub Zawadzki 999326cd34 This should be enough to make buildbot happy (bug #7054)
svn path=/trunk/; revision=42005
2012-04-10 12:21:15 +00:00
Stig Bjørlykke 602883402d Adjusted UAT name.
svn path=/trunk/; revision=41844
2012-03-30 12:45:43 +00:00
Stig Bjørlykke adabb3d63e Added support for configuring custom LDAP AttributeValue types.
svn path=/trunk/; revision=41841
2012-03-30 09:08:55 +00:00
Stig Bjørlykke 91f2f97f28 Don't try to convert AttributeValue to string if having a ldap_name dissector.
Prefix the converted printable string correctly with 'AttributeValue: '.

svn path=/trunk/; revision=41823
2012-03-29 12:03:49 +00:00
Anders Broman 6b3c0cd4f8 Remove now unused variables.
svn path=/trunk/; revision=41319
2012-03-02 11:25:17 +00:00
Alexis La Goutte 8e968adb2c Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41298
2012-03-02 11:00:24 +00:00
Anders Broman 42b44648c8 Get rid of Warnings.
svn path=/trunk/; revision=39954
2011-11-20 08:59:19 +00:00
Bill Meier 24cf0aad06 Update generated ASN1 *.[hc] files after recent work done by Jeff Morriss;
The only change in each file is in a comment showing the asn2wrs cmd used to build that file.

svn path=/trunk/; revision=39427
2011-10-15 19:27:27 +00:00
Bill Meier 6142dd287b Convert 'encoding' parameter of certain proto_tree_add_item() calls in asn1/*:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

 Also: For type FT_IPv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39332
2011-10-10 01:38:20 +00:00
Bill Meier e2996ceabe Convert 'encoding' parameter of certain proto_tree_add_item() calls in asn1 dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39294
2011-10-06 16:50:13 +00:00
Stig Bjørlykke a7c5d642d5 Regenerate ASN.1 dissectors to update the #line directive.
svn path=/trunk/; revision=37118
2011-05-13 08:12:27 +00:00
Jeff Morriss 9be16e49c4 From Stefan Metzmacher and Gregor Beck via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5850 :
The smallest LDAP PDU is 7 bytes, not 4.

svn path=/trunk/; revision=36777
2011-04-21 19:51:05 +00:00
Gerald Combs 793d683575 Regenerate the ANSI MAP, LDAP, and TETRA dissectors so that Coverity can
locate their template files.

svn path=/trunk/; revision=36569
2011-04-11 23:07:53 +00:00
Gerald Combs 670d38ec71 Properly initialize our filter counters.
svn path=/trunk/; revision=36190
2011-03-14 16:00:51 +00:00
Gerald Combs 91fe31c9b4 If we encounter an excessively long filter string or one with too many
elements, add an expert item and throw a ReportedBoundsError. We may
want to handle this more cleanly in the future but this avoids
allocating a huge amount of memory.

svn path=/trunk/; revision=36101
2011-03-01 00:50:17 +00:00
Gerald Combs 4783795690 Split get_dns_name() into get_dns_name() and expand_dns_name().
In dissect_ms_compressed_string() dissect_mscldap_string() simply call
expand_dns_name() instead of using duplicate (and insecure) code. This
*might* break CLDAP and SMB dissection. If that's the case we should
probably revert get_dns_name() and simplify expand_dns_name().

Fixes infinite recursion errors found by joernchen of Phenoelit.

svn path=/trunk/; revision=36029
2011-02-23 00:51:02 +00:00
Chris Maynard 8d47cebd00 Declare ett's as gint, not guint.
svn path=/trunk/; revision=35902
2011-02-10 20:55:26 +00:00
Anders Broman b2992b2310 ldap.cnf:782: warning: ISO C90 forbids mixed declarations and code
svn path=/trunk/; revision=35476
2011-01-11 11:41:03 +00:00
Ronnie Sahlberg 3079c9c931 From Matthieu Patou <mat@samba.org>
Dissect LDAP DirSyncFlags to show the bits of this bitmap.



svn path=/trunk/; revision=35474
2011-01-11 02:27:41 +00:00
Stephen Fisher 802308ca01 More misc. CLDAP improvements for Active Directory including updating
field names and adding descriptions, changing the Domain GUID in the "LDAP
ping" response to a FT_GUID instead of FT_BYTES, etc.


svn path=/trunk/; revision=35407
2011-01-06 22:24:10 +00:00
Stephen Fisher a9761c53b7 More minor cleanup/fixes for MS Active Directory's use of CLDAP.
svn path=/trunk/; revision=35404
2011-01-06 18:50:39 +00:00