Commit Graph

114 Commits

Author SHA1 Message Date
Michael Mann a09de615b4 Fix Function call argument is an uninitialized value
Change-Id: I716e80e53477edd419164c61937800795a550869
Reviewed-on: https://code.wireshark.org/review/2651
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 14:07:31 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Hadriel Kaplan 04c05a21e3 Fix Bug 9920 Buildbot crash due to SDP/RTP mismatch
For details see comments in Bug 9920.

The executive summary:
Bug 9920 is a crash caused by a couple of issues:

1) The memory ownership model for the rtp_dyn_payload hashtable is split: SDP
creates the rtp_dyn_payload hashtable, but RTP can free it. Since there isn't
*one* pointer to the hashtable, RTP freeing it means SDP has a dangling
pointer.

2) Either the SDP dissector shouldn't be creating two separate, unique
hashtables for multiple media channels of the same addr:port, or RTP shouldn't
be free'ing the previous one.

Change-Id: I436e67de6882f84aa82dcbdfe60bf313fe4fd99c
Reviewed-on: https://code.wireshark.org/review/918
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-03 04:40:20 +00:00
Evan Huus adc46f571c Tighten the NO_MORE_DATA_CHECK macros
We should return if we've already somehow overflowed the apparent length, not
just if we've hit it dead on.

Fixes bug #9932 and probably others.

Change-Id: I2719c3bd38f03e18ea557df962ee4a1beb64c2e8
Reviewed-on: https://code.wireshark.org/review/862
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-29 16:04:50 +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
Guy Harris aa69618c74 Use tvb_memdup(), not tvb_get_string(), when copying octets (such as
octets within a BCD number).

Use tvb_get_string_enc() rather than tvb_get_string().

svn path=/trunk/; revision=54919
2014-01-23 01:35:28 +00:00
Michael Mann 84dc9e9b4b Revert "from me" changes of r54676. Checks for NULL were functional logic, not trying to NULL protect proto_item_append_text.
svn path=/trunk/; revision=54681
2014-01-09 20:19:43 +00:00
Guy Harris 993a4d5b7c Mark an unused parameter as such.
svn path=/trunk/; revision=54677
2014-01-09 03:01:37 +00:00
Michael Mann 5ff31ef33d Remove some global variables. Bug 9471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9471)
From Michael Lum
From me: Remove a few proto_item* NULL checks because it's done by the underlying function.

svn path=/trunk/; revision=54676
2014-01-09 02:49:18 +00:00
Alexis La Goutte c3a3825b99 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=54414
2013-12-23 20:13:04 +00:00
Jakub Zawadzki deb2b236f2 Add missing includes
svn path=/trunk/; revision=54332
2013-12-21 17:23:17 +00:00
Jakub Zawadzki 576c7eae45 Move base64_to_tvb() to tvbuff_base64.c
svn path=/trunk/; revision=54325
2013-12-21 14:33:54 +00:00
Michael Mann cc152029f3 Exposing a couple of more constant arrays for ANSI-637. Bug 9471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9471)
From Michael Lum

svn path=/trunk/; revision=54241
2013-12-19 01:37:54 +00:00
Jeff Morriss 5c8e65009e Presumably ansi_tsb58_language_ind_vals shouldn't be static (since it's listed in the header file).
svn path=/trunk/; revision=54206
2013-12-18 02:08:17 +00:00
Michael Mann 88b9db9bd6 ANSI A-interface improvements. Bug 9471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9471)
From Michael Lum

svn path=/trunk/; revision=54205
2013-12-18 01:30:50 +00:00
Pascal Quantin d319ad5d92 Do not modify the bytes given to proto_tree_add_uint_format_value() in case there is a mask present in hf definition.
Otherwise the bits displayed in the tree are not the right ones.

svn path=/trunk/; revision=54179
2013-12-17 13:31:58 +00:00
Pascal Quantin 894d8d096b Fix a crash when calling try_val_to_str_ext()
svn path=/trunk/; revision=54177
2013-12-17 13:11:44 +00:00
Pascal Quantin 0f6429c3bf Fix the offset when dissecting a Signal reserved field
svn path=/trunk/; revision=54174
2013-12-17 11:28:48 +00:00
Martin Mathieson 5c085177fe Intialise a variable to avoid a (bogus) warning with my version of gcc
svn path=/trunk/; revision=54163
2013-12-16 23:26:09 +00:00
Guy Harris e4a880b819 Get rid of unused variable.
svn path=/trunk/; revision=54160
2013-12-16 23:00:58 +00:00
Guy Harris 8bbff418d3 Fix typo in formatting string (%%s should be %s).
Mark unused argument as such.

svn path=/trunk/; revision=54159
2013-12-16 22:43:10 +00:00
Michael Mann 54c272466f ANSI A-interface enhancements. Bug 9471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9471)
From Michael Lum:
1. Allow mobile ID and service option to be shown in the INFO line for various messages.
2. proto_tree_add_text -> proto_tree_add_item conversions.

From me:
1. Even more proto_tree_add_text -> proto_tree_add_item conversions.

svn path=/trunk/; revision=54157
2013-12-16 21:39:44 +00:00
Michael Mann 7221215cdc Add "rtp handle protection" inside srtp_add_address/rtp_add_address/bluetooth_add_address so dissectors calling it don't need to find "rtp" just for the handle check.
svn path=/trunk/; revision=53288
2013-11-12 22:04:03 +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 bb36a25089 Remove use of pinfo->private_data and just pass the data around through function parameters
Remove g_pinfo from packet-ansi_637.c and add packet_info* as a function parameter while we're at it.

svn path=/trunk/; revision=52883
2013-10-27 01:06:44 +00:00
Bill Meier 76d4b43a29 Minor whitespace, formatting & etc changes.
svn path=/trunk/; revision=52588
2013-10-13 18:14:59 +00:00
Michael Mann cf80442912 Convert some proto_tree_add_string_format calls to something more appropriate.
There seem to be several cases of proto_tree_add_string_format where a "string" value/filter doesn't really make sense because it's always empty, and is just being used as a "filterable subtree header (placeholder)".  They appear to be more for "presense" than "value" and should probably be FT_NONE, although I'd almost argue for removing the filter in favor of  proto_tree_add_text.

svn path=/trunk/; revision=52296
2013-09-30 15:21:09 +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 9de7a12476 Fix "Tones off" value typo introduced in r51613
svn path=/trunk/; revision=51729
2013-09-03 18:29:34 +00:00
Pascal Quantin 446bf4045d According to X.S0059 specification, when using FemtoInterfaceMsg Body the Information Elements for the Complete Layer 3 Information message shall not be included
svn path=/trunk/; revision=51614
2013-08-31 15:21:39 +00:00
Pascal Quantin 8711038106 Fix (for real) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9068 :
Add dissection of Signal and Call Waiting Indicator IEs when present in MS Information Records IE

svn path=/trunk/; revision=51613
2013-08-31 14:44:50 +00:00
Pascal Quantin dba0ceff0e From Jon Carmicheal via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9068 :
BSMAP: add dissection of Signal IE when present in MS Information Records IE

svn path=/trunk/; revision=51611
2013-08-31 10:06:33 +00:00
Pascal Quantin 81b6d6aab3 Do not use ephemeral memory when adding a new data source
svn path=/trunk/; revision=51423
2013-08-19 10:39:43 +00:00
Pascal Quantin a2452d6926 Fix dissection of FemtoInterfaceMsg media type when it includes a mandatory LV or V IE
svn path=/trunk/; revision=51193
2013-08-07 17:34:49 +00:00
Pascal Quantin 564c6234fc Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8883 :
Add support for FemtoInterfaceMsg media type

svn path=/trunk/; revision=51040
2013-07-30 21:27:01 +00:00
Michael Mann 98492c5619 expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicable
svn path=/trunk/; revision=50337
2013-07-03 02:59:31 +00:00
Michael Mann 7e8e5b347e Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
2013-05-25 17:06:40 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman b848149964 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48428
2013-03-19 21:06:52 +00:00
Anders Broman 04766017df - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48282
2013-03-13 21:14:20 +00:00
Anders Broman 221b249acd svn path=/trunk/; revision=48272 2013-03-12 21:58:04 +00:00
Bill Meier 6549fbbad7 #if 0 unused hf[] entries & etc.
Note: All (or almost all) unused hf[] entries
       in non-generated Wireshark dissectors
       have been #if 0'd (or commented) out.
       (This applies only to 'static hf_...' vars).
      A number of (non-generated) dissector
       files with *missing* hf[] entries
       still need to be fixed.


svn path=/trunk/; revision=47459
2013-02-03 22:29:48 +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
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Bill Meier 82d40100d2 Change 'for (i=1; i<=n;...' to 'for (i=0; i<n; ...)'
Done on general principles altho upon inspection
none of the cases changed would have actually
resulted in an infinite loop.



svn path=/trunk/; revision=45478
2012-10-11 19:39:32 +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
Michael Mann 6c0e747f61 use session allocated memory for rtp_add_address/srtp_add_address hash tables
svn path=/trunk/; revision=44571
2012-08-19 00:21:26 +00:00