Commit Graph

33 Commits

Author SHA1 Message Date
Evan Huus 6df83e8078 Add _g_ to the names of functions that allocate glib memory. This is a bit more
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures
that take the appropriate wmem pool.

Majority of the conversion done with sed.

svn path=/trunk/; revision=52164
2013-09-21 17:04:41 +00:00
Pascal Quantin 9486a3d974 More wmem conversion (leaving uat related functions aside)
svn path=/trunk/; revision=52055
2013-09-15 13:46:13 +00:00
Michael Mann de68fd6eea Removed check_col() and the occasional tree.
svn path=/trunk/; revision=49938
2013-06-14 17:49:53 +00:00
Anders Broman 55c498169d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48400
2013-03-18 21:16:23 +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 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 586ea8d092 Add call to add_new_data_source() for a newly created REAL_DATA tvb.
svn path=/trunk/; revision=40203
2011-12-14 18:58:08 +00:00
Bill Meier 199da73e21 Prevent memory leakage of uncompress tvb and associated data buffer (step 1).
(tvb memory leak will actually remain until a bug in tvbuff.c is also fixed).

svn path=/trunk/; revision=40171
2011-12-13 02:56:44 +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 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 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
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
2011-10-04 22:44:31 +00:00
Anders Broman 6a4ed4f4c3 From Michael Mann.
Part of "display filters with redundancies of PROTABBREV in them."
The ones left outs should be fixed differently I think.
Rename som ndps hf variables while at it.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2794

svn path=/trunk/; revision=37406
2011-05-26 06:32:51 +00:00
Bill Meier a2b58f051d Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
(In many cases I previously incorrectly removed the #include <stdlib.h>).

svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Bill Meier ea10c028b1 Don't assign to a proto_item* if the value won't be used: Coverity 958-961.
svn path=/trunk/; revision=36335
2011-03-25 21:52:56 +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
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
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
2010-12-20 05:35:29 +00:00
Jeff Morriss dfa6aa82a7 Fix SE memory corruption reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5318 :
Ensure the digest is smaller than our buffer before copying it.

svn path=/trunk/; revision=34581
2010-10-20 01:49:32 +00:00
Bill Meier 93b94a23ca Define some fcns & vars as static; Some #includes not req'd; packet-mikey.h not req'd.
svn path=/trunk/; revision=34464
2010-10-10 23:28:40 +00:00
Stig Bjørlykke 637274ebbc Change back from tvb_child_uncompress() to tvb_uncompress() when
parent is NULL, because this will lead to a DISSECTOR_ASSERT in 
tvb_set_child_real_data_tvbuff().

This bug was introduced in revision 31499.

svn path=/trunk/; revision=31659
2010-01-25 13:58:07 +00:00
Bill Meier c5614625ee Fix some gcc -Wshadow warnings ....
svn path=/trunk/; revision=31559
2010-01-18 23:16:10 +00:00
Anders Broman 324af9e6fa Fix part of Bug 3917 "tvb_new_real_data is prone to memory leak"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3917

svn path=/trunk/; revision=31499
2010-01-11 16:14:26 +00:00
Kovarththanan Rajaratnam cf8138e195 Remove check_col() guard
svn path=/trunk/; revision=30124
2009-09-24 19:50:43 +00:00
Kovarththanan Rajaratnam 124faf721c Use col_set_str instead of col_add_fstr/col_add_str when adding constant strings to COL_INFO
svn path=/trunk/; revision=30089
2009-09-23 14:52:01 +00:00
Kovarththanan Rajaratnam 633bb05380 Use col_set_str instead of col_add_fstri/col_add_str when adding constant strings to COL_PROTOCOL
svn path=/trunk/; revision=30088
2009-09-23 14:43:23 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Stig Bjørlykke 0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Bill Meier cba2558006 Fix code so changing port pref will work + other small changes:
- Use NULL instead of "" in blurb in hf[];
- Remove unnecessary #includes;
- Make various internal functions static;
- Use tabs consistently for indentation;
- Some reformatting of statements;

svn path=/trunk/; revision=27885
2009-03-29 15:34:26 +00:00
Anders Broman f36c046eef Fix:
packet-ldss.c: In function 'dissect_ldss_transfer':
packet-ldss.c:469: warning: 'ldss_tree' may be used uninitialized in this function
packet-ldss.c:469: warning: 'line_tree' may be used uninitialized in this function

svn path=/trunk/; revision=27881
2009-03-29 14:16:37 +00:00
Stephen Fisher 1ab88afea0 Squelch warning about variable may be used uninitialized in this function
svn path=/trunk/; revision=27878
2009-03-29 05:30:26 +00:00
Stephen Fisher a7d48ed8b6 Patch from enhancement bug #3265: LDSS (local download sharing service)
svn path=/trunk/; revision=27877
2009-03-29 04:58:27 +00:00