Commit graph

65 commits

Author SHA1 Message Date
Evan Huus
dab27680cd From Pavel Moravec via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9612
Fix possibly-uninitialized variable caught by valgrind fuzzing in AMQP.

svn path=/trunk/; revision=54981
2014-01-27 13:42:34 +00:00
Evan Huus
893b1aa3cd Remove duplicate #include.
svn path=/trunk/; revision=54928
2014-01-23 13:39:39 +00:00
Guy Harris
222296999b Use tvb_get_string_enc() with appropriate encodings rather than
tvb_get_string().  (Some versions of the spec speak of ISO 8859-15
strings as well as UTF-8 strings, but we don't appear to try to handle
those.)

Update spec URL.

svn path=/trunk/; revision=54910
2014-01-22 20:51:56 +00:00
Alexis La Goutte
a3fee176d4 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=54902
2014-01-22 07:49:48 +00:00
Guy Harris
1d27123ab1 Longs are not guaranteed to be 64-bit. Use G_GINT64_MODIFIER to format
64-bit quantities.

svn path=/trunk/; revision=54863
2014-01-20 21:37:32 +00:00
Evan Huus
77e4a2f09c Fix 32/64 casting and add a note where the loss of precision might actually be a
problem for 32-bit platforms.

svn path=/trunk/; revision=54858
2014-01-20 19:32:43 +00:00
Evan Huus
f5931c7559 From Pavel Moravec via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9612
AMQP 1.0 Dissector

svn path=/trunk/; revision=54857
2014-01-20 19:13:42 +00:00
Evan Huus
a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Jakub Zawadzki
c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Jakub Zawadzki
ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Michael Mann
8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?

Should tcp_dissect_pdus return length (bytes consumed)?  There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb).  Seems like that could all be rolled into one.

svn path=/trunk/; revision=53198
2013-11-09 17:46:28 +00:00
Pascal Quantin
a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Pascal Quantin
efe18f199c Convert a few dissectors from emem to wmem API
svn path=/trunk/; revision=51983
2013-09-12 20:37:30 +00:00
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
Michael Mann
e597acdc48 Batch of filterable expert info.
svn path=/trunk/; revision=51625
2013-09-01 13:05:27 +00:00
Michael Mann
30c5457f71 Convert proto_item_set_expert_flags into something filterable.
svn path=/trunk/; revision=51135
2013-08-04 13:08:59 +00:00
Anders Broman
6bde918078 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48426
2013-03-19 20:00:52 +00:00
Bill Meier
1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +00:00
Evan Huus
0fa191245e Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8337
Make offset unsigned and add an additional sanity check.

svn path=/trunk/; revision=47681
2013-02-15 20:58:59 +00:00
Bill Meier
c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Bill Meier
65384d0091 General cleanup:
- Don't call col...() & expert...() under 'if (tree)';
- Localize some variables; Remove uneeded initializers;
- Remove incorret _U_ from certain function parameters;
- Reformat long-lines; Do whitespace changes;
- Misc.


svn path=/trunk/; revision=46444
2012-12-07 16:25:56 +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
Bill Meier
c02d156881 The amqp dissector is not a plugin; remove comment indicating that it's a plugin.
Also: Fix some "4 space tab" indentation (replace with spaces).

svn path=/trunk/; revision=43566
2012-07-04 13:04:16 +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
ffb49b9561 From Matt Dainty:
Add array datatype parsing to AMQP dissector.

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

svn path=/trunk/; revision=40879
2012-02-06 17:27:36 +00:00
Anders Broman
62866c78a0 Get rid of Warnings.
svn path=/trunk/; revision=39957
2011-11-20 12:43:04 +00:00
Anders Broman
42b44648c8 Get rid of Warnings.
svn path=/trunk/; revision=39954
2011-11-20 08:59:19 +00:00
Alexis La Goutte
d9623925e8 Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39606
2011-10-26 18:00:54 +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
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
Chris Maynard
417e8f7469 Delete duplicate line of code. Fixes Coverity CID 1281 (UNUSED VALUE).
svn path=/trunk/; revision=39050
2011-09-19 19:49:06 +00:00
Guy Harris
998cbd5ed3 Close up space between ENC_BIG_ENDIAN) and ;.
svn path=/trunk/; revision=38992
2011-09-14 07:16:26 +00:00
Anders Broman
f72e423c33 From Aaron Schrab:
AMQP dissector support for Exchange Bind method.
- From me simplify writing to column.
- remove deprecated check_col
- Use ENC_BIG_ENDIAN.

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

svn path=/trunk/; revision=38991
2011-09-14 07:04:45 +00:00
Bill Meier
2bf572bc41 Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...
svn path=/trunk/; revision=38413
2011-08-08 17:59:32 +00:00
Bill Meier
b708c2892b Dissectors don't need to #include <gmodule.h>
Also: #include <stdlib.h> not req'd in some cases.

svn path=/trunk/; revision=38409
2011-08-08 15:41:09 +00:00
Bill Meier
12ff22254f Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings
svn path=/trunk/; revision=37998
2011-07-13 17:04:55 +00:00
Jeff Morriss
cdedb31e94 As suggested by Chris: use val_to_str_const() instead of match_strval() plus a
NULL-return check.

Use val_to_str_const instead of val_to_str() in a couple places where the string
is constant.

Use val_to_str() instead of blindly passing the return value from match_strval()
into a format routine (to ensure a non-NULL string pointer).  A couple of these
were cases where it could not actually return NULL, but I changed it for
consistency.

Store the return value of match_strval() rather than calling it repeatedly.

svn path=/trunk/; revision=37204
2011-05-17 18:58:40 +00:00
Stephen Fisher
39699efe92 Fix compilation error:
packet-amqp.c:5617:5: error: "/*" within comment

Cause:

Previous comment wasn't terminated right


svn path=/trunk/; revision=36454
2011-04-04 17:42:37 +00:00
Bill Meier
8b0a085250 Don't assign to a proto_item * if the value won't be used: Coverity 827;
Comment out some currently unused code: Coverity 828.

svn path=/trunk/; revision=36453
2011-04-04 17:24:17 +00:00
Jeff Morriss
9335685106 Fix the fuzz failure in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5550 :
In dissect_amqp_0_10_array() if the 'type' is unknown, don't loop (for
potentially a very long time) adding the same element over and over again
(since the type is unknown, we don't know how much to increase the offset so
an exception is never thrown).

svn path=/trunk/; revision=35406
2011-01-06 21:07:58 +00:00
Guy Harris
8d35834342 Fix (legitimate) warning.
svn path=/trunk/; revision=35382
2011-01-05 17:38:03 +00:00
Guy Harris
216fed8397 From Steve Huston: add support for AMQP 0-10.
From me: add 0_9 to names for #defines and routines for 0-9, add expert
info for the "you ran past the end of the field table" error.

svn path=/trunk/; revision=35380
2011-01-05 17:19:48 +00:00
Guy Harris
eaad8c00f2 Put end-of-field-table checks back into dissect_amqp_field_table().
svn path=/trunk/; revision=35369
2011-01-05 06:11:10 +00:00
Guy Harris
57f521fa1a Don't use DISSECTOR_ASSERT() to catch malformed packets. Fixes bug
4048.

svn path=/trunk/; revision=35357
2011-01-04 08:04:27 +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
3edbdc151d Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34229
2010-09-24 01:34:45 +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
Guy Harris
969b98fa35 tvb_get_ntohl() doesn't return a long on any platform (it returns a
guint32, and on no platform supported by GLib, and thus on no platform
supported by Wireshark, does a guint32 have to be an unsigned long), so
there's no need to cast it to long and print it with %lld.

svn path=/trunk/; revision=31540
2010-01-16 02:39:25 +00:00
Stig Bjørlykke
0929d61df2 Changed abbrev for amqp_field.
svn path=/trunk/; revision=31431
2010-01-03 15:09:26 +00:00