Commit graph

108 commits

Author SHA1 Message Date
Guy Harris
07f22ffd40 Use tvb_get_string_enc() rather than tvb_get_string().
XXX - if we supported various MacXXX character encodings, we could use
those; that might require a preference to specify the encoding.

svn path=/trunk/; revision=54906
2014-01-22 19:31:03 +00:00
Bill Meier
c00f8779f5 Don't use 'L' as a constant modifier.
svn path=/trunk/; revision=54358
2013-12-22 14:47:16 +00:00
Jakub Zawadzki
064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Guy Harris
4043db5865 Rename spotlight_get_utf16_string_encoding() to
spotlight_get_utf16_string_byte_order(), and have it return
ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN if it finds a BOM and 0xFFFFFFFF if
it doesn't, to make it a bit clearer what it's doing.

Use tvb_get_string_enc() rather than tvb_get_unicode_string().

svn path=/trunk/; revision=54075
2013-12-13 22:44:58 +00:00
Chris Maynard
acc5fd78e4 Reject the packet if data is NULL.
svn path=/trunk/; revision=53707
2013-12-02 02:18:21 +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
77837d2c9e Pass struct aspinfo "private data" into subdissectors instead of using pinfo->private_data.
svn path=/trunk/; revision=52728
2013-10-21 00:27:36 +00:00
Pascal Quantin
102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +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
Evan Huus
343772cbcf Convert a few more dissectors to wmem.
svn path=/trunk/; revision=51967
2013-09-12 12:25:17 +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
28bb3a5591 Batch of filterable expert infos.
svn path=/trunk/; revision=50384
2013-07-05 03:10:36 +00:00
Jaap Keuter
97136126bc Typo's. That is all.
svn path=/trunk/; revision=48685
2013-04-01 15:29:49 +00:00
Anders Broman
455f5c8243 - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48265
2013-03-12 20:00:50 +00:00
Guy Harris
7f40879104 Squelch a (Y2.038K) warning.
svn path=/trunk/; revision=46756
2012-12-26 06:41:49 +00:00
Guy Harris
be77dce42a Make some loop counters unsigned, so that we handle very large loop
counts by trying to iterate all over the items (and, presumably, failing
when we go past the end of the packet).

When assigning to the loop count, cast the value down, to avoid implicit
64-bit-to-32-bit conversion warnings.

Write those loops as for loops - it makes it a bit clearer what's going
on.

svn path=/trunk/; revision=46657
2012-12-21 08:16:12 +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
c591c6dd56 Comment out all but first value_string array entries with dup values:
kept: first dup since that's the one which would
       be found with a linear search.

svn path=/trunk/; revision=44642
2012-08-23 17:30:42 +00:00
Gerald Combs
cd3cca7edc Make the corresponding packet_info available to each tree item. This
lets us pass a NULL pinfo to expert_add_info_format() and
expert_add_undecoded_item(), which makes it possible to use those
routines deep in the bowels of many dissectors. As a proof of concept
remove the recent pinfo additions to packet-afp.c. This should also make
it easier to fix bug 3884.

svn path=/trunk/; revision=44435
2012-08-10 20:33:01 +00:00
Gerald Combs
015f22cc9a Use wording that's more in line with other expert messages.
svn path=/trunk/; revision=44402
2012-08-09 22:02:28 +00:00
Gerald Combs
5bdeb03b83 Fix a large loop found by Stefan Cornelius of Red Hat Security Response
Team (bug 7603).

Display the ACL entry count as decimal instead of hexadecimal.

svn path=/trunk/; revision=44317
2012-08-07 23:06:29 +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
Pascal Quantin
2f035a3c0f From Frank Lahm via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7334 :
FPSpotlightRPC dates structure can contain multiple dates

svn path=/trunk/; revision=43133
2012-06-06 16:55:48 +00:00
Anders Broman
b69547925f Get rid of a couple of warnings.
svn path=/trunk/; revision=43066
2012-06-04 13:52:46 +00:00
Bill Meier
91e5923458 Fix some "warning: Value stored to '...' is never read" clang scan-build warnings.
Also; Do some whitespace cleanup in a few cases.

svn path=/trunk/; revision=42715
2012-05-19 14:20:55 +00:00
pascal
101e304d4e Spaces -> tabs
svn path=/trunk/; revision=42637
2012-05-15 21:18:39 +00:00
pascal
96e21ee3f7 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7261 :
Add some sanity checks when dissecting SQ_TYPE_NULL

svn path=/trunk/; revision=42636
2012-05-15 21:16:06 +00:00
pascal
d5aa739fd0 From Alexander Lüders & Frank Lahm via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7254 :
Enhancements for FPSpotlightRPC AFP function

svn path=/trunk/; revision=42633
2012-05-15 19:25:33 +00:00
pascal
05cfd1c391 From Frank Lahm via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7256 :
Fix subquery_count loop variable updating

svn path=/trunk/; revision=42624
2012-05-14 21:46:02 +00:00
pascal
723b213c89 From Frank Lahm via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7246 :
Patch adding dissection of time data

svn path=/trunk/; revision=42620
2012-05-13 21:02:42 +00:00
pascal
b42423a8dc From Frank Lahm:
In FPSpotlightRPC packets, check for elements with 0 childs (denoted by L in TLV is sizeof(TLV tag))
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7245

svn path=/trunk/; revision=42571
2012-05-11 09:03:22 +00:00
pascal
19a766b152 Remove unused hf entries
svn path=/trunk/; revision=42516
2012-05-08 20:20:12 +00:00
pascal
0c4569d941 From Frank Lahm:
Display guids in FPSpotlightRPC AFP packets
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7237

svn path=/trunk/; revision=42515
2012-05-08 19:38:58 +00:00
Anders Broman
b438c7415f From Frank Lahm:
Fixes for FPSpotlightRPC AFP dissector.

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

svn path=/trunk/; revision=42508
2012-05-08 14:24:13 +00:00
Bill Meier
2fef9f460f Don't use tabs in string constants;
svn path=/trunk/; revision=42357
2012-04-30 19:55:24 +00:00
Jeff Morriss
891c9db19b As suggested in http://www.wireshark.org/lists/wireshark-dev/201204/msg00062.html :
Don't use ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN with ENC_ASCII: ASCII has no
endianism, so ENC_NA is more appropriate.

svn path=/trunk/; revision=42297
2012-04-27 18:58:37 +00:00
Jakub Zawadzki
8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Bill Meier
cad303d777 (Trivial) Fix a typo in a comment; Do some whitespace changes.
svn path=/trunk/; revision=41092
2012-02-20 22:46:24 +00:00
Alexis La Goutte
78c4f454f9 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40093
2011-12-04 18:43:05 +00:00
Stephen Fisher
082938900c Fix Coverity ID #1288: UNUSED_VALUE in spotlight_dissect_query_loop:
"returned_pointer: Pointer ... is never used" due to break and end 
of function after the switch block.


svn path=/trunk/; revision=39470
2011-10-19 16:15:53 +00:00
Stephen Fisher
20ae7e93d5 Fix Coverity ID 1300: UNUSED_VALUE in dissect_spotlight: "returned_pointer
is never used" because of the return -1 at the end of this if block.
Removed item_toc = assignment and fixed indentation.


svn path=/trunk/; revision=39469
2011-10-19 16:08:13 +00:00
Chris Maynard
c553e708a2 Cleanup AFP Version display filter name.
svn path=/trunk/; revision=39448
2011-10-17 23:58:25 +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
Guy Harris
6c3f1f0df7 Squelch some more warnings.
svn path=/trunk/; revision=39212
2011-10-02 08:58:35 +00:00
Guy Harris
b061017eca Squelch warnings (at that point, toc_offset has been determined to fit
into an int, as has offset + toc_offset + 8).

svn path=/trunk/; revision=39211
2011-10-02 08:40:03 +00:00
Guy Harris
3bad9fcc4d SQ_TYPE_NULL appears to do run-length encoding of nulls; do run-length
encoding of the list of nulls in the protocol tree, so if we have a
ridiculously large number of nulls, we don't have a ridiculously large
number of protocol tree entries, one for each null.  This should
(finally) fix bug 6378.

Add some additional sanity checks to avoid integer overflows and
underflows due to subtracting N from a value not guaranteed to be >= N.

In the big switch statements for AFP command codes, put the break
statement on a separate line, so it's a bit more obvious that the code
isn't falling through.

svn path=/trunk/; revision=39210
2011-10-02 08:12:08 +00:00
Guy Harris
e4532f21af Quit if we have a zero-length query, so we don't loop indefinitely.
Should fix bug 6378.

svn path=/trunk/; revision=39176
2011-09-28 19:08:20 +00:00
Anders Broman
c0c4fb5f21 Make query_length a gint as the lenght argument to proto_tree_add_text() is a gint.
svn path=/trunk/; revision=39067
2011-09-21 07:36:26 +00:00
Guy Harris
3e7c0390d7 From Frank Lahm: Complete dissection of AFP FPSpotlightRPC function.
From me: don't use global variables in FPSpotlightRPC dissection.

svn path=/trunk/; revision=39065
2011-09-20 19:24:07 +00:00
Guy Harris
98bbf4578d Use ENC_ values in proto_tree_add_item() calls. Use ENC_UTF_8 for
strings, and note that, for older AFP clients and servers, we might need
a way to say to use some Mac encoding instead.

Use tvb_strsize() rather than tvb_get_ephemeral_stringz() to just get
the length of a null-terminated string.

Use FT_GUID for UUIDs.

The low-order bit in the MessageBitmap in the FPGetSrvrMsg reply does
not, at least according to the current AFP spec, specify whether there's
a message at all, it specifies whether it's a server message or a login
message.  The spec *does* now mention the "message is UTF-8" bit; use
it.

Fix a blurb.

svn path=/trunk/; revision=39063
2011-09-20 17:23:16 +00:00