Commit Graph

26 Commits

Author SHA1 Message Date
Evan Huus aa922b0624 Try to fix stack-buffer-overflow caught by ASAN
Use wmem_array_append rather than wmem_array_append_one to make sure the pointer
types match up. _append_one automatically takes the address of its argument,
which causes problems if that argument is already a pointer.

Thanks to Alexis for catching this.

Change-Id: Ie702bb2c776f9fcf31bd64073c756edd75d888e8
Reviewed-on: https://code.wireshark.org/review/1657
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-16 02:38:49 +00:00
Pascal Quantin b2af5b066a Convert a few dissectors with simple request/response tracking from red/black tree to hash map
Update the readme file accordingly

Change-Id: I056d1ab1f77df641b83fa9b3618b6c25d66e1a83
Reviewed-on: https://code.wireshark.org/review/1420
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 10:23:32 +00:00
Alexis La Goutte 5d2e945dbc Fix Dereference of null pointer found by Clang analyzer
packet-gvcp.c:2101:7: warning: Access to field 'req_frame' results in a dereference of a null pointer (loaded from variable 'gvcp_trans')

Change-Id: If39453f9f2ade551fd8c7e369fd60325c16df24b
Reviewed-on: https://code.wireshark.org/review/1393
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-27 21:22:56 +00:00
Alexis La Goutte 574a3ef42b Add Modelines info
Change-Id: I978198266523a0b1f0ba9d4ed6848664a6fa3637
Reviewed-on: https://code.wireshark.org/review/1394
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27 19:55:01 +00:00
Alexis La Goutte e0b15f5e17 Fix warning found by -Wunused-const-variable (Clang 3.5)
packet-gvcp.c:493:27: error: unused variable 'linkconfiguration_class' [-Werror,-Wunused-const-variable]

Change-Id: Id31ced029af9700f47230df4afa5c0a4aaecf6d3
Reviewed-on: https://code.wireshark.org/review/1392
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27 19:42:56 +00:00
Guy Harris 1ba06e65b0 Fix FSF address.
Change-Id: Ic79fcf7e1bebb9821d9d9db43c2a4f4291beb706
Reviewed-on: https://code.wireshark.org/review/1374
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-26 17:50:08 +00:00
warren babe895d3a Updated gvcp dissector
Change-Id: I49f6acecdbcdf171ba28af171f8067322cc5ecf1
Reviewed-on: https://code.wireshark.org/review/1220
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-26 01:53:38 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +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
Bill Meier 9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Pascal Quantin 868b345eea Convert a few more dissectors to wmem API
svn path=/trunk/; revision=52053
2013-09-15 10:29:49 +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 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 d65261d344 Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
(Some minor whitespace cleanup).

svn path=/trunk/; revision=39488
2011-10-20 14:07:54 +00:00
Bill Meier 67ee5049d4 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_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +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
Jeff Morriss 339136d1d0 Based on patch from Denis Ovsienko via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6244 :

Fix typo: s/unkown/unknown/

svn path=/trunk/; revision=38561
2011-08-16 13:16:33 +00:00
Alexis La Goutte 45ed74451e Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=36705
2011-04-18 18:06:22 +00:00
Sake Blok 6e74ad9097 Adress => Address corrections (also in comments).
(see bug 5600)


svn path=/trunk/; revision=35600
2011-01-21 00:19:03 +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
Bill Meier f12c3e59ff A few minor changes:
- Move proto_reg_handoff... to the end of the file;
- Remove unneeded forward declaration;
- Fix a typo;
- Use #if 0/#endif rather than /*...*/to comment-out code.

svn path=/trunk/; revision=32200
2010-03-16 01:07:42 +00:00
Guy Harris 1f1a9ef2cc tvb_length() is *not* the length of the packet; it's the amount of
captured data for the packet, which could well be less then the length
of the packet if a slice/snapshot length was used. 
tvb_reported_length() is the length as the packet appeared on the
{wire,air}.

If a > b, and you want to report how much a was greater than b, subtract
b from a, don't take the negative of b-a, especially if a and b are
unsigned....

svn path=/trunk/; revision=32199
2010-03-15 21:36:56 +00:00
Jaap Keuter ecb18edf04 From Adrian Daerr:
I have written a crude dissector of GigE-vision Control Protocol packets.
The dissector was written as part of the opengigevision project:
http://gitorious.org/opengigevision

svn path=/trunk/; revision=32198
2010-03-15 21:07:46 +00:00