Commit Graph

17560 Commits

Author SHA1 Message Date
Jeff Morriss 9bee5819f8 Fix the fuzz failure reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8940 :
Test whether idx is in range or not (by seeing if it was found in the
value_string) before using it as an index into any of the elem_var arrays.

This fuzz failure was in elem_telv() but apply the fix to all the elem_*()
functions.

svn path=/trunk/; revision=50672
2013-07-16 17:59:26 +00:00
Chris Maynard 91ecc2334f "man inet_pton" only says that it returns a negative value, zero or a postive value, and not specifically -1, 0, or 1, so even though we know that's what wsutil's inet_pton will return, we shouldn't test against those exact values.
svn path=/trunk/; revision=50670
2013-07-16 16:23:31 +00:00
Michael Mann bb05898720 Remove ADWIN_ADD_LE and ADWIN_ADD_BE macros as they don't add much to readability/code savings and they prevent the "check" scripts from doing their job.
svn path=/trunk/; revision=50669
2013-07-16 16:02:39 +00:00
Chris Maynard 02fa8a5d19 Fix Coverity CID 1050092: Dereference null return value.
svn path=/trunk/; revision=50667
2013-07-16 15:30:20 +00:00
Chris Maynard e93fdab447 Fix Coverity CID 1055436: Improper use of negative value.
svn path=/trunk/; revision=50666
2013-07-16 15:19:52 +00:00
Chris Maynard 1ece46dd80 Fix Coverity CID 1050089: "Explicit null dereferenced", by Move some lines of code into the if(tree != NULL) block.
svn path=/trunk/; revision=50665
2013-07-16 15:10:38 +00:00
Michael Mann 18ea28c45e Improve iec104 dissector. Bug 8849 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8849)
1) Decoding type 70 - End of initialization
2) Decoding qualifier of interrogation for type 100
3) Table of data length for all object types => checking length on one place
4) Setting correct number of selected bytes for IOA

From Jiří Engelthaler

svn path=/trunk/; revision=50664
2013-07-16 14:01:45 +00:00
Pascal Quantin 3baf637267 Allow to perform sequence analysis when only RLC headers are logged
svn path=/trunk/; revision=50663
2013-07-16 12:28:33 +00:00
Chris Maynard 44e4c933de Fix warning: cannot optimize possibly infinite loops. There was no actual infinite loop, but the intended loop iteration count could have been wrong due to the implicit "mod 256" when previously assigning a value to a guint8.
svn path=/trunk/; revision=50661
2013-07-16 03:34:04 +00:00
Evan Huus a430b138e9 Replace glib memory with wmem. Fixes a substantial memory leak in the TCP
dissector (potentially several megabytes for a large capture).

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

svn path=/trunk/; revision=50652
2013-07-16 01:57:30 +00:00
Chris Maynard e4bb300667 A better method of avoiding the "ISO C restricts enumerator values to range of 'int'" warning.
svn path=/trunk/; revision=50649
2013-07-16 01:14:40 +00:00
Guy Harris 54ee8a0f9a Don't compare a guint32 against -1, compare it against 0xFFFFFFFFU.
svn path=/trunk/; revision=50643
2013-07-15 22:27:58 +00:00
Chris Maynard 42a3ceea66 Fix warning: ISO C restricts enumerator values to range of 'int'
svn path=/trunk/; revision=50641
2013-07-15 21:53:52 +00:00
Chris Maynard e37533ced7 Fix warnings: comma at end of enumerator list.
svn path=/trunk/; revision=50640
2013-07-15 21:37:55 +00:00
Chris Maynard 1c19a0d61e Fix warnings: format '%blah' expects argument of type 'foo', but argument 'i' has type 'bar' [-Wformat].
svn path=/trunk/; revision=50639
2013-07-15 21:22:34 +00:00
Chris Maynard f5f20fa8e3 Fix warning: ISO C does not allow extra ';' outside of a function.
svn path=/trunk/; revision=50638
2013-07-15 20:42:57 +00:00
Chris Maynard 49051b18d1 Fix warning: ISO C does not support %n$ operand number formats.
svn path=/trunk/; revision=50637
2013-07-15 20:29:36 +00:00
Alexis La Goutte 4c34d30a35 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50631
2013-07-15 18:06:19 +00:00
Alexis La Goutte 208071629d Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50630
2013-07-15 18:06:08 +00:00
Alexis La Goutte 9ddfede761 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50629
2013-07-15 18:05:57 +00:00
Alexis La Goutte b583443a75 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50628
2013-07-15 18:05:37 +00:00
Alexis La Goutte 58bf1dc4f7 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50627
2013-07-15 18:05:27 +00:00
Alexis La Goutte f7f3b668ef Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50626
2013-07-15 18:05:14 +00:00
Alexis La Goutte e918ee63e4 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50625
2013-07-15 18:05:04 +00:00
Alexis La Goutte e48f3cd707 Use 2 Spaces indent and add modelines info
svn path=/trunk/; revision=50624
2013-07-15 18:04:53 +00:00
Alexis La Goutte c55d2bc057 Fix warnings found by fix-encoding-args tools.(and remove some tabs also)
svn path=/trunk/; revision=50623
2013-07-15 18:04:43 +00:00
Alexis La Goutte 7614891152 Use 4 Spaces indent and add modelines info
svn path=/trunk/; revision=50622
2013-07-15 18:04:33 +00:00
Alexis La Goutte 3dd52ea2da Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50621
2013-07-15 18:04:23 +00:00
Alexis La Goutte c39ca07c7e Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50620
2013-07-15 18:04:14 +00:00
Alexis La Goutte 2aa451859a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50619
2013-07-15 18:04:03 +00:00
Alexis La Goutte cde1b3d4bb Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50618
2013-07-15 18:03:54 +00:00
Alexis La Goutte 779c37aa20 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50617
2013-07-15 18:03:43 +00:00
Alexis La Goutte 15a785c757 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50616
2013-07-15 18:03:33 +00:00
Alexis La Goutte 579b937bdf Use "generic" tfs (tfs_set_notset)
svn path=/trunk/; revision=50615
2013-07-15 18:03:13 +00:00
Alexis La Goutte 19fcedc185 Fix error from checkAPI.pl
Error: Found non-ASCII characters on line 871 of packet-scsi-osd.c

svn path=/trunk/; revision=50608
2013-07-15 08:13:28 +00:00
Anders Broman b99a650455 From Javier Godoy:
adds support for the OSD-2 CREATE USER TRACKING COLLECTION service action, following the approach described in bug 8832. It also implements dissection of the CDB continuation segment.

Change in scsi_osd_extra_data_t:
 - Add a continuation_length field (we need that value from the CDB when later dissecting the Data In buffer)

The following fields were added:	
 - hf_scsi_osd2_cdb_continuation_length
 - hf_scsi_osd2_cdb_continuation_format
 - hf_scsi_osd2_continued_service_action
 - hf_scsi_osd2_cdb_continuation_descriptor_type
 - hf_scsi_osd2_cdb_continuation_descriptor_pad_length
 - hf_scsi_osd2_cdb_continuation_descriptor_length
 - hf_scsi_osd2_source_collection_object_id

The following expert_info fields were added:
 - ei_osd2_cdb_continuation_format_unknown (PI_UNDECODED, PI_ERROR)
 - ei_osd2_continued_service_action_mismatch (PI_PROTOCOL, PI_WARN)
 - ei_osd2_cdb_continuation_descriptor_type_unknown (PI_UNDECODED, PI_WARN)
 - ei_osd2_cdb_continuation_descriptor_length_invalid (PI_PROTOCOL, PI_ERROR)
 - ei_osd2_cdb_continuation_length_invalid (PI_PROTOCOL, PI_ERROR)
 
The following value_string arrays were added:
 - scsi_osd2_cdb_continuation_format_val (OSD2r4 Table 69)
 - scsi_osd2_cdb_continuation_descriptor_type_val (OSD2r4 Table 71)
 
The following functions were added:	 
 - dissect_osd2_cdb_continuation_length (dissect the cdb continuation length field in cdb and save continuation_length in extra_data)
 - dissect_osd2_cdb_continuation (dissect the cdb continuation segment from the data out buffer; currently, descriptor-specific fields are not dissected)
 - dissect_osd2_create_user_tracking_collection 
 
Changes in dissect_osd_collection_object_id 
 - add an int hfindex parameter
 - the return type was made void (previously it returned int, but the return type was unused)
 - this function is used for filling collection_id related fields (there are several flavors of them) and may be modified for displaying creation/removal information (à la dissect_osd_partition_id)
 - one call to dissect_osd_requested_collection_object_id was replaced by dissect_osd_collection_object_id(...,hf_scsi_osd_requested_collection_object_id)
 - two calls to dissect_osd_collection_object_id were updated with the new signature

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

svn path=/trunk/; revision=50605
2013-07-15 04:56:01 +00:00
Anders Broman e9872cf077 Update dissection.
svn path=/trunk/; revision=50604
2013-07-15 04:50:42 +00:00
Anders Broman 17c0371414 From Javier Godoy:
fix partitions being inadvertently set as removed.

In dissect_osd_get_attributes and dissect_osd_set_attributes there were calls to dissect_osd_partition_id with the last parameter (is_removed) set to TRUE instead of FALSE. That caused dissect_osd_partition_id reporting the partitions as "removed". 

The only service action where is_removed must be TRUE is dissect_osd_remove_partition.

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

svn path=/trunk/; revision=50603
2013-07-15 04:50:03 +00:00
Jeff Morriss 58b3567ccb From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8920 :
Changed FATTR4_DISSECT_VALUES arg to FATTR4_BITMAP_ONLY in calls to 
dissect_nfs4_fattrs() in cases NFS4_OP_OPEN and NFS4_OP_CREATE of
dissect_nfs4_response_op().

svn path=/trunk/; revision=50602
2013-07-15 04:00:20 +00:00
Jeff Morriss 54bb2e7a5c Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Jeff Morriss 27059c2804 Fix up some white space.
svn path=/trunk/; revision=50597
2013-07-15 02:05:54 +00:00
Guy Harris 221f39988b Fix incorrect use of dlsw.frame_direction for capability exchange
frames; that should be a separate dlsw.capex_type field.

dlsw.error_cause is a numeric field, so it needs a base; the values in
the value_string table are in hex, so show it in hex.

svn path=/trunk/; revision=50589
2013-07-14 19:34:45 +00:00
Guy Harris d3be9807c4 Get rid of duplicate "Old message type" field.
svn path=/trunk/; revision=50587
2013-07-14 19:02:19 +00:00
Guy Harris 0e40234217 Make pointers to raw packet data pointers to guint8, not pointers to
char; they're chunks of raw octets, not characters.

svn path=/trunk/; revision=50586
2013-07-14 17:39:36 +00:00
Jakub Zawadzki 543ba2746b fix: ../../asn1/t38/packet-t38-template.c:346: warning: request for implicit conversion from 'gpointer' to 'char *' not permitted in C++
svn path=/trunk/; revision=50582
2013-07-14 15:51:15 +00:00
Jakub Zawadzki 2671b8a398 fix: packet-mp2t.c:489: warning: implicit declaration of function 'tvb_new_proxy'
svn path=/trunk/; revision=50581
2013-07-14 15:20:09 +00:00
Jakub Zawadzki c766e78cfa Rewrite reassemble API to use TVBs instead of raw data.
(it seems to be working for TCP ^^)

svn path=/trunk/; revision=50580
2013-07-14 14:42:05 +00:00
Jakub Zawadzki 2131f22508 Rewrite packet-mime-encap to use composite tvbs + cloning
svn path=/trunk/; revision=50571
2013-07-14 08:41:04 +00:00
Michael Mann a32513416b First real test of convert_proto_tree_add_text.pl.
svn path=/trunk/; revision=50566
2013-07-14 02:01:49 +00:00
Evan Huus c7909c4195 Fix one small leak in xml dissector registration.
svn path=/trunk/; revision=50564
2013-07-14 00:54:02 +00:00