Commit Graph

55 Commits

Author SHA1 Message Date
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
Chris Maynard 814682d0d8 Fix Coverity CID 701035: Dereference after null check of hfinfo.
svn path=/trunk/; revision=42843
2012-05-25 01:14:29 +00:00
Guy Harris 7162bcf833 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42546
2012-05-10 06:34:37 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
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
2011-10-15 18:46:26 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/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=39288
2011-10-06 03:35:44 +00:00
Bill Meier 91191c6c00 Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
(Code commented out since it may be required in the future (at least in some cases).

svn path=/trunk/; revision=37723
2011-06-20 01:13:21 +00:00
Jeff Morriss 50e1634f4c Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
so that if the start_ptr is NULL the bytes are extracted from the given TVB
using the given offset and length.

Replace a bunch of:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...])

with:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...])

svn path=/trunk/; revision=35896
2011-02-10 16:31:00 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Jeff Morriss 8d32d2066a There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or
tvb_get_const_stringz().

Use tvb_memeql() & tvb_memcmp().

svn path=/trunk/; revision=35558
2011-01-16 20:51:21 +00:00
Bill Meier 1a365d735c Use value_string_ext to access 'commands' value_string.
svn path=/trunk/; revision=34690
2010-10-29 18:33:21 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Jeff Morriss d1573b53c0 Don't pass a NULL pointer to what is supposed to be (according to the format) a string: some implementations of vsnprintf() will core on that. (Unfortunately it seems that g_vsnprintf() doesn't protect us from this...)
svn path=/trunk/; revision=32848
2010-05-17 21:49:09 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Stig Bjørlykke 539b558f8c Renamed some reassembled data texts.
Removed some check_col().

svn path=/trunk/; revision=31809
2010-02-06 18:20:21 +00:00
Stig Bjørlykke 47e732e29e Changed "reassembled_length" -> "reassembled.length".
svn path=/trunk/; revision=31776
2010-02-03 08:47:15 +00:00
Stig Bjørlykke 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Stig Bjørlykke 85c8e31574 From Kovarththanan Rajaratnam via bug 3548:
More header_field_info cleanup.

From me:
Don't fix the empty name for hf_nisplus_dummy.

svn path=/trunk/; revision=28792
2009-06-21 18:45:56 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Gerald Combs 6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Gerald Combs fc71188963 Update calls to proto_tree_add_bytes_format to reflect r27047.
svn path=/trunk/; revision=27053
2008-12-18 20:19:49 +00:00
Stig Bjørlykke e6a22e689e Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26648
2008-10-31 15:34:00 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Stig Bjørlykke 28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Anders Broman 90753a169e Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length().
non heuristic dissectors

svn path=/trunk/; revision=23405
2007-11-08 22:40:20 +00:00
Jaap Keuter 4c22ba92f9 Flag error
svn path=/trunk/; revision=23218
2007-10-17 18:25:01 +00:00
Jörg Mayer 6bb9369681 "fix" some warnings about "might be used uninitialized" variables
svn path=/trunk/; revision=22983
2007-09-26 07:09:51 +00:00
Ronnie Sahlberg a944d1a3e8 since the fid dissector helper now adds a lot of extra info to the tree
we must now pass it a (semi-)valid tvb.


svn path=/trunk/; revision=21783
2007-05-15 09:48:02 +00:00
Ronnie Sahlberg e5e23150ab prettify dissection of FIDs,
put the filename, if known, on the fid expansion line

also place a "generated" fid in failed ntcreateandx so it is easier to 
quickly see which file the ntcreateandx failed for


svn path=/trunk/; revision=21739
2007-05-10 02:34:06 +00:00
Stephen Fisher 763a80f5bb Fix more warnings
svn path=/trunk/; revision=21286
2007-03-30 21:20:57 +00:00
Ulf Lamping 411249419d fix some more warnings (type casts)
svn path=/trunk/; revision=21141
2007-03-23 00:51:21 +00:00
Ronnie Sahlberg 5c2232dc22 replace a rotating buffer in smb with ep allocated memory
dont try dcerpc reassembly of fragments if we dont have the entire pdu

only call the heuristical dissectors once from smb/pipe as per guy(?)s comments about idempotence.
when doing reassembly, the dcerpc dissector is indeed not idempotent any more.



svn path=/trunk/; revision=19304
2006-09-23 13:21:54 +00:00
Ronnie Sahlberg d76b58cbfb track smb FIDFs when tehy are opened and closed.
add an expansion to the fid that display which frame itr was opened in and when it was closed.



someone may want to add tracking of actual filenames here as well.   i am not sure i need that feature myself   so ...



svn path=/trunk/; revision=18512
2006-06-18 05:45:40 +00:00
Ronnie Sahlberg a5db166102 rename add_fid() to dissect_smb_fid() as a firsdt step towards adding tracking of filename/openedframe/closedframe tracking for smb fids
svn path=/trunk/; revision=18506
2006-06-18 01:58:34 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Gerald Combs 40be5362b6 Coverity CID 48 is still complaining about a NULL dereference. Hopefully
this will fix it.

svn path=/trunk/; revision=17708
2006-03-23 18:22:42 +00:00
Ronnie Sahlberg 2f37e2de15 coverity bug 44
svn path=/trunk/; revision=17621
2006-03-14 05:38:47 +00:00
Ronnie Sahlberg b1a11016ec remove a redundant if statement
this if statement always evaluate to true since it is called from a single place that is only entered if the very same expression is also true there.




svn path=/trunk/; revision=17524
2006-03-08 10:51:33 +00:00
Ronnie Sahlberg 806a5c8d95 for really really weird malformed lanman packets it is theoretically possible
that trp is uniunitialized.



coverity bug 46



svn path=/trunk/; revision=17523
2006-03-08 10:36:28 +00:00
Ronnie Sahlberg 06d73310c9 fix a potential null dereference
found in coverity cid:48


svn path=/trunk/; revision=17509
2006-03-07 20:47:20 +00:00
Guy Harris f6ef22c553 Have show_exception() take a "const char *" as its exception message,
and not free the string to which it points.  Pass to
REPORT_DISSECTOR_BUG() strings allocated with ep_strdup_printf(), so
that they're freed automatically.

svn path=/trunk/; revision=16039
2005-09-28 16:16:37 +00:00
Guy Harris ab2dca9114 Move some headers for stuff defined by a dissector into epan/dissectors
- and rename smb.h to packet-smb.h, as it's packet-smb.c's header file.

svn path=/trunk/; revision=15845
2005-09-17 00:31:15 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +00:00
Ulf Lamping e2c3b60280 add a generated toplevel line between the TCP protocol and the desegmented content, to better understand what's going on while desegmenting.
We'll have to add similar mechanisms for other protocols as well...

svn path=/trunk/; revision=14527
2005-06-02 18:52:55 +00:00
Gerald Combs c64e5e59f6 Make a field type check more strict. Remove some unnecessary code.
svn path=/trunk/; revision=14338
2005-05-10 03:10:09 +00:00
Gerald Combs b41f8bfb2a Make sure we don't pass an invalid length to proto_tree_add_item(). Found
during fuzz testing.

svn path=/trunk/; revision=14237
2005-04-30 04:09:28 +00:00
Gerald Combs 38db8769c9 In dissect_pipe_lanman(), return FALSE if p_tvb is null, no matter what.
Fixes bug 132.

svn path=/trunk/; revision=14221
2005-04-28 18:34:02 +00:00