Commit Graph

57747 Commits

Author SHA1 Message Date
Guy Harris 493ddd5963 OK, this appears to be what's intended.
Include a column to describe what's intended.  If that's *not* what's
intended, fix the comment and the twisty little maze of #defines.

Change-Id: Ic5d120c401d8aba23a19e9d042b1460621b80e0b
Reviewed-on: https://code.wireshark.org/review/7815
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 02:41:41 +00:00
Guy Harris 77bc38e498 Clean up handling of buffer size.
Instead of a twisty little maze of #if, #ifdefs, and #elifs, all
different, define HAVE_BUFFER_SIZE upfront iff we can set the buffer
size - i.e., if this is Win32, and thus we're using WinPcap, or if we
have pcap_create() and thus pcap_set_buffer_size() - and use that to
govern whether to have a buffer size setting or not.

Always put the buffer size setting in the right vertical box.  If that
doesn't work well for some configurations of available interface knobs,
feel free to change the checks, but please make it less opaque what's
going on (include a comment if necessary).

Change-Id: I384c601982b470ae08de271431eac06d6c925332
Reviewed-on: https://code.wireshark.org/review/7814
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 01:30:28 +00:00
Guy Harris 162f26625d Generate format strings at compile time.
This squelches some compiler warnings, with the addition of
G_GNUC_PRINTF() calls.

Change-Id: I76f7515889727dc7fad27ac90ca96750384a46f3
Reviewed-on: https://code.wireshark.org/review/7812
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 01:12:23 +00:00
Michael Mann 004cafd82b Replace HF_EMPTY and ETT_EMPTY with -1
Change-Id: If3e89f8e46edd4eef82037b6b348fd70a9a3033d
Reviewed-on: https://code.wireshark.org/review/7811
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-25 01:05:02 +00:00
Michael Mann b8b172cc34 convert proto_tree_add_uint -> proto_tree_add_item
The calls were just passing in a tvb_get function anyway.

Change-Id: If69b2d41997f748dc5d12650e2553d5bc69930ce
Reviewed-on: https://code.wireshark.org/review/7810
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-25 01:04:38 +00:00
Roland Knall 8a3bd9ee38 Win32: Compilation error if winpcap remote capturing disabled
If HAVE_PCAP_REMOTE is not set, this code is not defined and therefore will not be
compiled correctly.

Change-Id: Ie08a6f99598d46cfa38e2448ea979a8a9aa7c7fc
Reviewed-on: https://code.wireshark.org/review/7803
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-24 23:59:41 +00:00
Pascal Quantin 7710da4d77 Since g2ef72cb, plugins are no more stored in plugins/$VERSION folder
Also update the custom samples to reflect the latest changes done

Change-Id: I2ac865fad1acdef5a5c4d68a155cbdf970c306f5
Reviewed-on: https://code.wireshark.org/review/7805
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-24 20:54:01 +00:00
Mikhail Koreshkov 6545d199cc Q931: Dissect IEC/ISO cause coding standard as ITU-T
Add preference to enable dissect IEC/ISO cause coding as ITU-T (Q.850)

Change-Id: Id61f0785b8355f1aed03c4dea70657d661af3f11
Reviewed-on: https://code.wireshark.org/review/7806
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-24 20:02:59 +00:00
Peter Wu cc4bce537b ftsanity.py: make it work with modern tshark
Broken since 4ac2441d7c ("Coalesce "-G
fields2" and "-G fields3" into "-G fields").

This patch fixes Python3 compatibility, fixes handling of the changed
output and option and prints the faulting line on assertion error. It
also updates two dissectors which had tabs in their description,
breaking the output.

Tested with Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3.

Change-Id: Ifcd0d0eb092b357eca357cd53f2e1348ebf8885c
Reviewed-on: https://code.wireshark.org/review/7791
Reviewed-by: Gilbert Ramirez <gram@alumni.rice.edu>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-24 05:13:46 +00:00
Peter Wu 693304bf53 checklicenses.py: add python3 compatibility
Tested with Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3.

Change-Id: I5893bb32d339118ec968edc7de0e185e39ab4f81
Reviewed-on: https://code.wireshark.org/review/7789
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-24 05:10:39 +00:00
Edward Dao 570bc36b58 http2: fix dissection over TLS
Previously, the http2 heuristics dissector sets a conversation dissector
which overrides the SSL dissector, breaking SSL decryption before http2.
This patch fixes that by checking for an active http2 session in the
http2 heuristics dissector.

Change-Id: Ibacbcde3e29bbb746ad2e394f1c10ca571b07bf5
Reviewed-on: https://code.wireshark.org/review/7782
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-24 05:08:42 +00:00
Michael Mann ae20651d9a Overhaul WSP dissector.
1. Remove proto_tree_add_text (the reason I started the update)
2. Add expert info (mostly related to proto_tree_add_text, but since I was in the neighborhood...)
3. Replace "big functions macros" with "small macro" + real function (for big .o size savings)
4. Remove DebugLog macro (intent seems to duplicate basic functionality of a step-through debugger)
5. Replace HF_EMPTY (and comparible macros) with -1
6. Move header handler array to remove need for many forward declarations.

Change-Id: Ic5467289aae7d54e78c1fd65f93358387d6139aa
Reviewed-on: https://code.wireshark.org/review/7799
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-24 05:01:29 +00:00
Evan Huus a6fc6aa0b4 wcp: add validations to decompressed_entry
Ensure that a reference to past bytes refers to bytes that actually exist.

Bug: 10978
Change-Id: If95d785ee15243c88edcd7115b5ff25fbaa08e6c
Reviewed-on: https://code.wireshark.org/review/7783
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-24 02:01:27 +00:00
Pascal Quantin a4a5adb68b GSM RLC/MAC: fix an out of bounds access
When GRNTI does not exist in Packet Measurement Report R5 additions, too many lines are skipped

Fixes an ASAN failure reported by Alexis

Change-Id: I400bc4d9732f1d8e3c6fb8b72bf08a70a636d78c
Reviewed-on: https://code.wireshark.org/review/7772
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-23 10:12:16 +00:00
Guy Harris 1b4120846e Centralize the code to set the active_dlt value for a device.
We were doing it similarly, but not the same, in several places; make a
common routine for it.

Have that code check to make sure the DLT_ value in question is actually
supported by the device; if not, pick the first supported DLT_ value, if
any; this keeps it from, for example, picking a bad DLT_ value if your
defaults were set based on monitor mode being on but monitor mode
actually being off, or vice versa.

Change-Id: I1722bfeaf60429bc5c6f665fdea3d466052b13bd
Reviewed-on: https://code.wireshark.org/review/7795
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-23 00:00:42 +00:00
Pascal Quantin c474bb8691 Update libwireshark0.symbols file
Change-Id: Ib79e9eabd44d3eb444be7a33d30d5a1f9839d548
Reviewed-on: https://code.wireshark.org/review/7794
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-22 18:52:33 +00:00
Peter Wu 355e913f91 delete_includes.py: Python 3 compatibility
While improving python 3 compatibility, fix whitespaces and remove the
useless try/except block as these modules are part of core.

Tested with Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3 (with "make"
replaced by "true" and by comparing stdout).

Change-Id: I9c585da89aef76f01672c8f7320ac4a13c6cc7d7
Reviewed-on: https://code.wireshark.org/review/7790
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-03-22 16:33:47 +00:00
Gerald Combs 7a90a6b834 [Automatic manuf, services and enterprise-numbers update for 2015-03-22]
Change-Id: Icddd1da625dd7bb333f888fd9832e12d7c6512d1
Reviewed-on: https://code.wireshark.org/review/7786
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-22 15:05:55 +00:00
Alexis La Goutte c2740149ba IPv6: fix using extended field designator is an extension [-Wextended-offsetof]
Change-Id: Ibe5fce79a195b27e5d8e84c86613298083dabef2
Reviewed-on: https://code.wireshark.org/review/7780
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-22 14:18:49 +00:00
Michael Mann 4afaad75d5 Remove proto_tree_add_text from packet-ospf.c
Change-Id: Ice87c69902a09874d5bdfa996523db9a9af50706
Reviewed-on: https://code.wireshark.org/review/7785
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-22 00:15:41 +00:00
Alexis La Goutte 67fc01c698 IPv6: fix indent (use 4 spaces) and Modelines info
Change-Id: Iabd6de1e3ca7e7de156847fd33d38a25ac14f1c2
Reviewed-on: https://code.wireshark.org/review/7784
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-21 20:15:22 +00:00
Michael Mann 461911bf54 Replace copying of packet_info with just saving fragmented member of packet_info.
Bug:11071
Change-Id: I6d87ace5f6bed1b1d0db98eef25204130ba21c9e
Reviewed-on: https://code.wireshark.org/review/7777
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-21 13:24:48 +00:00
Alexis La Goutte ce76a6478b Proto.h: fix parameter 'err' not found in the function declaration [-Wdocumentation]
Change-Id: Ibca63a9119b9c45e6a24fe3dc14dc7ed86c3576a
Reviewed-on: https://code.wireshark.org/review/7774
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-21 12:11:52 +00:00
Guy Harris f0311abe72 Rename update_interface_list() and remove local interface code from it.
It's only used to update the remote interface list, and never updates
anything else (it sets iftype_id to CAPTURE_IFREMOTE and never changes
it, so all tests for whether iftype_id is == or >= CAPTURE_IFREMOTE
succeed); remove the code that would be executed if, somehow, iftype_id
got stomped on, and rename it to update_remote_interface_list().

Change-Id: I3bd80fb19bb14ef5bdf2c1a77a10f1f32bb62aba
Reviewed-on: https://code.wireshark.org/review/7773
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-21 10:06:14 +00:00
janssend 2450bf90d9 Updated sercos discriptor CP0 for MDT0 and AT0
Updated the sercos discriptor for CP0. Some additional flags were added in
AT0 and MDT0 during specification improvement.

Change-ID: I784b1686b6c4adad154fe0747202f299e5c8095b
Reviewed-on: https://code.wireshark.org/review/7061
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-21 07:55:03 +00:00
Alexander Stein 6c38340789 MQTT: Prevent subsequent messages from overwriting the Info column
Without a fence col_add_fstr will overwrite the whole column on each
message.
Instead of adding a fence and adding the message info use
col_append_sep_str which also supports a separator out of the box.
e.g. "Connect Command, Publish Message, Disconnect Req"

Change-Id: I346d9b659a044143cd31f08081ad145b9186307c
Signed-off-by: Alexander Stein <alexanders83@web.de>
Reviewed-on: https://code.wireshark.org/review/7771
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-20 23:46:32 +00:00
Alexander Stein 2afb52461c MQTT: Dissect on default port automatically
There is a IANA reserved port number for MQTT: 1883

Change-Id: I9bc3c83b9d7eda291728fe7311f4b7a817d3a833
Signed-off-by: Alexander Stein <alexanders83@web.de>
Reviewed-on: https://code.wireshark.org/review/7770
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-20 20:56:25 +00:00
Stig Bjørlykke 14c9b175f5 DMP: Make dmp.body.data FT_BYTES
With this it's possible to fetch the body from a Lua script again.

Change-Id: Ie1502d47ca3c137aedb4197c6a345b3eb340735a
Reviewed-on: https://code.wireshark.org/review/7769
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-03-20 08:58:43 +00:00
Pascal Quantin f620be556c MBIM: use proto_tree_add_item_ret_uint
Change-Id: I70c348222f4f30a651c69ccfd479180684d9c9fe
Reviewed-on: https://code.wireshark.org/review/7763
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-20 06:53:38 +00:00
Bill Meier d7b23278c3 (Benign) Fix warning [-Werror=logical-not-parentheses] (GCC 5.0.0)
Add some parentheses to prevent warning:
  "logical not is only applied to the left hand side of comparison"

Change-Id: I8f11f93e12d24a1ea09032cf0198042fe9a87068
Reviewed-on: https://code.wireshark.org/review/7768
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-20 05:32:48 +00:00
Michael Mann e7fd1bfdf7 Reduce epan dependence on dissectors by having print module "cache" the protocol and field ids that it needs.
Change-Id: I4ec48067e9ca2cbe88e1cf2e6c9dc1e382379221
Reviewed-on: https://code.wireshark.org/review/7767
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-20 05:30:52 +00:00
Gerald Combs 019c3af0b1 1.99.5 → 1.99.6.
Change-Id: Iff642606bdb9858dc54b90abe02bf1572f44fc25
Reviewed-on: https://code.wireshark.org/review/7766
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-20 00:53:49 +00:00
Gerald Combs 7e8595c198 Build 1.99.5.
Change-Id: I50505b48db1f14523f36a19a5e8232caff1e712a
Reviewed-on: https://code.wireshark.org/review/7765
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 23:32:52 +00:00
Gerald Combs 751df4e1fd Try to fix interface property fetching.
Use g_strdup instead of calculating string lengths manually. Return NULL
for empty strings, otherwise lo0 shows up as ": lo0" instead of
"Loopback: lo0" here.

Change-Id: I143aa5e12c9512b7a9f4729b62b353c13ee3635a
Reviewed-on: https://code.wireshark.org/review/7764
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 23:28:40 +00:00
Gerald Combs bc06ca20ca Revert "Revert "TCP: tabs -> spaces""
1.99.4 is done.

This reverts commit e60b826a01.

Change-Id: I230b12d3a83a0abcb93809321df2b4396a7f0a0b
Reviewed-on: https://code.wireshark.org/review/7760
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 19:20:45 +00:00
Gerald Combs cc7e565711 1.99.4 → 1.99.5.
Change-Id: Ifa1a57ac2db5d921d9b53dbe997cfa1916720c26
Reviewed-on: https://code.wireshark.org/review/7759
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 19:16:02 +00:00
Gerald Combs e60b826a01 Revert "TCP: tabs -> spaces"
The 1.99.4 is still in progress.

This reverts commit 260c84729c.

Change-Id: I8c24d301c103dd45e2ac2cdb4cda34b918ac5a37
Reviewed-on: https://code.wireshark.org/review/7758
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 19:04:37 +00:00
Pascal Quantin 260c84729c TCP: tabs -> spaces
Change-Id: Ia95addb6b26f7eed89bbfe62baea289a50cf0523
Reviewed-on: https://code.wireshark.org/review/7756
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-19 18:48:57 +00:00
Gerald Combs 6698f2da44 Build 1.99.4.
Change-Id: Id2d98cc5def03fd54d69c54db4565c6ecd27c552
Reviewed-on: https://code.wireshark.org/review/7755
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 16:47:57 +00:00
Gerald Combs 22f06b228f Add a couple of items to the release notes.
Change-Id: I0d27b436c6cae363a7c7ff9917707829fd30b52b
Reviewed-on: https://code.wireshark.org/review/7754
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 16:06:34 +00:00
AndersBroman b307ffe0f9 Implement proto_tree_add_item_ret_int() and proto_tree_add_item_ret_uint() which
works as proto_tree_add_item(), but also returns the value of (u)ints
of 8,16,24 and 32 bits length in a 32 bit variable. It's based on Hadriels
previous work.

Change-Id: If3b4b8588b63251f1ee9b954a202acde7c02ce86
Reviewed-on: https://code.wireshark.org/review/7230
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-19 16:06:18 +00:00
Uli Heilmeier ef7e4c52f2 Netflow/Ipfix: Add Citrix Netscaler AppFlow
This commit adds dissection of Citrix Ntscaler Appflow
templates to Netflow/Ipfix.

The documenation for the templates was found at:
https://raw.githubusercontent.com/splunk/ipfix/master/app/Splunk_TA_IPFIX/bin/IPFIX/information-elements/5951.xml

Due to non-disclosure I can't provide any sample pcap.

Change-Id: I1d34ad4298a51c71986bc8565cc5f3802b0df3c2
Reviewed-on: https://code.wireshark.org/review/7740
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-19 14:27:24 +00:00
Michael Mann f7b1678b12 Replace enumerated preference for choosing subdissector with a subdissector table and Decode As functionality.
This makes it much easier for other subdissectors (and plugins) to associate themselves with CAN.

Change-Id: I49dd832af51651d0c91f9850c100e544d178b8c4
Reviewed-on: https://code.wireshark.org/review/7734
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-19 12:49:10 +00:00
Guy Harris da3e4f92d5 Make the snapshot-length member of interface_t an int.
That matches what it is in other structures, and eliminates a compiler
warning.

While we're at it, remove an empty if statement revealed by that change.

Change-Id: I5e8c8f92fdb3567e75800c729443737032a1bcc7
Reviewed-on: https://code.wireshark.org/review/7752
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 06:38:44 +00:00
Michael Mann baa83912e3 Eliminate decode_bitfield_value from "public" use.
This "encourages" (forces) dissectors to use the bitmask field of the header_field_info structure to get "bitmask formatting" of a field.

other_decode_bitfield_value should be treated the same (eventually eliminated), but there are still replacements to be made in the dissectors.

Change-Id: I8a0d829c3fef2d5e5a588667a259e231bca559e6
Reviewed-on: https://code.wireshark.org/review/7736
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-19 04:33:26 +00:00
Guy Harris a1ea3ce81c Fix another call to capture_dev_user_snaplen_find().
Change-Id: I20064f782b7ad8ebffc70322a877d88501d6ef60
Reviewed-on: https://code.wireshark.org/review/7749
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 01:16:55 +00:00
Guy Harris a4eb512531 Squelch a "no implicit conversions in C++" warning.
Change-Id: Ib2876e055e8bfb1d0de36bbf7bb3b1e52217f108
Reviewed-on: https://code.wireshark.org/review/7748
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 01:13:52 +00:00
Guy Harris cb31cc61d7 Fix extracting of parameter.
We have to find the closing parenthesis before overwriting the opening
parenthesis, otherwise the end of the string, from which strrchr()
searches, is at the point where the opening parenthesis was.

Fix incorrect arithmetic (-1 + -1 + 1 = -1, not 1).

Change-Id: Ida47dd9670b36269eef28368aa845301a7185c3f
Reviewed-on: https://code.wireshark.org/review/7747
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:48:22 +00:00
Guy Harris c691af8737 Fix a comment.
Change-Id: I6e85f4abdc41ac01296b276f6b394376e75abe47
Reviewed-on: https://code.wireshark.org/review/7746
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:30:39 +00:00
Guy Harris 1fdfee69d6 Patch some memory leaks.
capture_dev_user_descr_find() and capture_dev_user_cfilter_find() return
g_malloc()ated strings; we don't need to g_strdup() them to get a
g_malloc()ated string, and we *do* need to free them if we aren't going
to use them any more.

Document that while we're at it, and give more details for the functions
returning integer user-specified interface parameters as well.

Change-Id: Icf98a48992b1c4168ead54bdc4cc2847da89d665
Reviewed-on: https://code.wireshark.org/review/7745
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:28:40 +00:00