Commit Graph

44 Commits

Author SHA1 Message Date
pascal ce8f5a4334 From Evan Huus:
Fix memory leak in process_body_part() when there is no body
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7212

svn path=/trunk/; revision=42350
2012-04-30 15:57:39 +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
Stig Bjørlykke 27d50a084a Added media type multipart/report from RFC3462.
svn path=/trunk/; revision=39298
2011-10-06 19:26:21 +00:00
Anders Broman 14fbabcb26 Get rid of check_col() and use ENC.
svn path=/trunk/; revision=39153
2011-09-26 17:50:54 +00:00
Bill Meier 26c721b7c9 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
Also: whitespace cleanup.

svn path=/trunk/; revision=37718
2011-06-19 19:13:26 +00:00
Jaap Keuter b67c9b05cb Supply an entry to use for unknown multipart subtype.
svn path=/trunk/; revision=34657
2010-10-27 06:48:39 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Bill Meier c5614625ee Fix some gcc -Wshadow warnings ....
svn path=/trunk/; revision=31559
2010-01-18 23:16:10 +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
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 60d3b45792 More size_t casts/fixes, and string buffers.
svn path=/trunk/; revision=27968
2009-04-06 00:08:46 +00:00
Bill Meier 808a4e2c3c Define certain fcns as static (if not used externally).
Also: whiule we're at it: 
 - fix hf[] blurbs as appropriate to use NULL;
 - fix some indentation

svn path=/trunk/; revision=27890
2009-03-29 22:16:26 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Bill Meier a042c3aedd Small changes related to proto_register & proto_reg_handoff
- Move find_dissector_table(...) to proto_reg_handoff;
 - Use dissactor_add_handle instead of registering the dissector to tcp port 0;
 - Use find_dissector when appropriate.


svn path=/trunk/; revision=26767
2008-11-13 01:31:57 +00:00
Anders Broman 86e0bde995 packet-multipart.c:179: warning: unused parameter 'pinfo'
packet-multipart.c:179: warning: unused parameter 'name'
( restore a bit of previous code)
Move inclusion of tvbuff.h to base64.c

svn path=/trunk/; revision=25909
2008-08-03 15:44:26 +00:00
Anders Broman 2b9d63a4b5 Move common code to base64.c
svn path=/trunk/; revision=25908
2008-08-03 14:27:22 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Anders Broman 6c161ff927 Packet-imf.c - Offset must be advanced to AFTER CRLF(CRLF).
packet-multipart.c - imf_find_field_end()'s maxlength is last offset in tvb.

svn path=/trunk/; revision=22476
2007-08-09 12:17:56 +00:00
Martin Mathieson 6bbe9bd5d6 Avoid an infinite loop (on malformed packet)
svn path=/trunk/; revision=22333
2007-07-17 11:54:22 +00:00
Graeme Lunt 4d0f66a26f Further problem highlighted by OSX.
svn path=/trunk/; revision=22314
2007-07-14 10:15:52 +00:00
Graeme Lunt d23237ab38 Fix for warnings on OSX.
svn path=/trunk/; revision=22313
2007-07-14 09:58:08 +00:00
Graeme Lunt 7b1032f9b0 Optional removal of any base64 content-transfer-encoding from a MIME
body before passing it to a sub-dissector. The decoded content is added 
as a new source, named with the filename or the content-type.


svn path=/trunk/; revision=22311
2007-07-14 09:19:35 +00:00
Graeme Lunt 2d671eadbd Consistent eol-style restored.
svn path=/trunk/; revision=22248
2007-07-05 16:31:12 +00:00
Graeme Lunt ce458040ac Allow for leading whitespace in parameters when looking for the boundary.
svn path=/trunk/; revision=22246
2007-07-05 16:19:36 +00:00
Martin Mathieson 8aa44209fa Make multipart part a proper field, and append contained content-type to
it label to make it easier to find the part you're looking for.

svn path=/trunk/; revision=19909
2006-11-16 14:35:52 +00:00
Ulf Lamping 0c23562511 fix #1135: another "off by one" bug, zero termination was done twice, second time writing behind the end of the available buffer
svn path=/trunk/; revision=19566
2006-10-16 23:13:21 +00:00
Martin Mathieson 0852c89fd1 - Mark the multipart type as a generated field.
- Remove the RFC 3261 attribution in the long text version of several headers (some of them I couldn't easily work out where the first non-obsoleted introduction of them is)

svn path=/trunk/; revision=19328
2006-09-26 13:01:27 +00:00
Martin Mathieson 6de1b28bb8 Add Content-Id and Content-Transfer-Encoding headers, as described in RFC 2045/6
svn path=/trunk/; revision=19264
2006-09-20 12:12:18 +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
Anders Broman fba662fa2a Add a missing include
svn path=/trunk/; revision=15686
2005-09-05 16:30:31 +00:00
Tomas Kukosa 44b2d9d828 buffer where parameters variable pointed into was freed
it is necessary to make a copy

svn path=/trunk/; revision=15684
2005-09-05 13:20:56 +00:00
Tomas Kukosa 4887fe9bf1 - set length for "Encapsulated multipart part" tree item
- pass right content type to media subdissectors

svn path=/trunk/; revision=15683
2005-09-05 11:59:22 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Jörg Mayer eab0aeb4bb More char -> const char fixes
Declare some functions static

svn path=/trunk/; revision=15158
2005-07-30 16:34:38 +00:00
Ronnie Sahlberg df2d1d3f22 ememify some more calls to tvb_get_string()
this fixes an obvious memleak in ms-mms


svn path=/trunk/; revision=15132
2005-07-28 09:56:19 +00:00
Guy Harris 2b7ca484ac From Ruud Linders: support short names in multipart headers; SIP-T
requires this.

svn path=/trunk/; revision=13127
2005-01-20 01:26:34 +00:00
Guy Harris 652b22c0b9 From Chris Maynard: free mallocated data.
Don't assign the result of a routine that mallocates data to a const
pointer - that forces us to cast the pointer when freeing the data.

svn path=/trunk/; revision=12960
2005-01-05 10:38:50 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00