Add ws_pipe_kill_child_on_exit, which associates a child process handle
with a job object that has the JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
flag set.
Call it when we create a process in ws_pipe_spawn_sync and
ws_pipe_spawn_async. Note that we might want to use it elsewhere.
Change-Id: Ia0f6863ea4df0ab8623bb923a49da7776d83bd33
Reviewed-on: https://code.wireshark.org/review/26398
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This should squelch a warning from VS Code Analyzer.
Change-Id: I69e528c3dfd851d287b1faebc1469cd700fa9ef5
Reviewed-on: https://code.wireshark.org/review/26402
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Unlikely, but not impossible, and should squelch a VS Code Analyzer
warning.
Change-Id: I399c08896a3f08962ca46483d47ba5f6cbe4f28e
Reviewed-on: https://code.wireshark.org/review/26400
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Previously there were three different pipe validity checks:
PID != WS_INVALID_PID, PID != 0 and stdin != 0. This resulted in
using/closing file descriptors which might be owned by something else.
When no GeoIP databases are defined, mmdb_resolve_stop would be called
to close the pipe and set PID to WS_INVALID_PID. stdin is however not
cleared and future invocations would try to close the previous fd.
Change-Id: I1d15da29208efb41098ee6a4edeeabf61f84c2b3
Fixes: v2.5.1rc0-466-ga1da75c554 ("Transition from GeoIP Legacy to MaxMindDB.")
Reviewed-on: https://code.wireshark.org/review/26391
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Change-Id: Idfb2b5a9d6fd1c571a5a9edeb91e7f9281a06df0
Reviewed-on: https://code.wireshark.org/review/26363
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
from draft-08 (07 ?) it is now handshake secret (and no cleartext secret)
Bug: 13881
Change-Id: I03983c13f0c37839e1a41b6beb20f6e133adc8f8
Reviewed-on: https://code.wireshark.org/review/26390
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
4630b4fcf8 sets octetCount to 0 in case of error. Let's check this
return value to avoid an infinite loop
Bug: 14519
Change-Id: Ie3519067d609afb1bbf9e67f7f15f95911d2b173
Reviewed-on: https://code.wireshark.org/review/26388
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
The cluster registration and initialisation is done in the functions 'proto_reg_handoff_zbee_zcl_XXX'.
In these functions the 1st step was to register the dissector.
Then the cluster was initialised via the function 'zbee_zcl_init_cluster'.
In this patch the registration and initialisation is now done by the function 'zbee_zcl_init_cluster'.
In this way we have a more uniform way of registration.
Change-Id: If865d904ea51c299a48e5c0004f3f280b7479d49
Reviewed-on: https://code.wireshark.org/review/26325
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
"status" is set by decrypt_ieee802154_payload, but GCC 7.3 is unaware:
epan/dissectors/packet-ieee802154.c: In function 'ieee802154_decrypt_payload':
epan/dissectors/packet-ieee802154.c:1912:9: error: 'status' may be used uninitialized in this function [-Werror=maybe-uninitialized]
switch (status) {
^~~~~~
Change-Id: Ia66e6a80f277470f8b242107275ea7467c37e212
Reviewed-on: https://code.wireshark.org/review/26372
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
"field" might be allocated even if the calculation type is
CALC_TYPE_BYTES, CALC_TYPE_FRAMES, or CALC_TYPE_FRAMES_AND_BYTES.
Change-Id: I0c70397a89e32172769c277bebfd950f1d21c679
Reviewed-on: https://code.wireshark.org/review/26378
Reviewed-by: Guy Harris <guy@alum.mit.edu>
We don't need to dynamically allocate a guint variable to hold the
response code value - and then not bother to free it! - if we're just
doing a lookup; we can use an automatic variable and pass a pointer to
it.
Change-Id: I6edbb352f0aa33c91ede0f4e1bbb962fa921bea2
Reviewed-on: https://code.wireshark.org/review/26375
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Make sure the text we read is null terminated. Properly strip our lines
and chunked strings. Copy over cast and strtod fixes from change 26347.
Change-Id: I0695e35c446c1bd277c53b458b07e428cdd90fb8
Reviewed-on: https://code.wireshark.org/review/26370
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
We need to ignore SIGPIPE whenever we use maxmind_db. Do so in
epan_init.
Ping-Bug: 14494
Change-Id: I4372935e371a94c02a79050d59b2e3ee1ba04fee
Reviewed-on: https://code.wireshark.org/review/26369
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
While based on IEEE 802.15.4, the protocol breaks the standard by
having frames where the FCF Security Enabled flag is set but no
Auxiliary Security Header is present. Add handling of this special case
to the IEEE 802.15.4 dissector.
Change-Id: I0e678d5fc999ead740c0c27f51a699559c6cb21a
Reviewed-on: https://code.wireshark.org/review/26336
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Pointers to them are passed to register_codec(), so they can be static
to l16decode.c.
Change-Id: I2303cc4374e81a2e5a77eaa275ca601d99a4f608
Reviewed-on: https://code.wireshark.org/review/26355
Reviewed-by: Guy Harris <guy@alum.mit.edu>
In true_false_string_from_table(), keep the pointers to the "true" and
"false" strings in local non-const pointer variables, so we can free
them without a complaint.
Only when we're finished, and have valid "true" and "false" strings, do
we allocate the true_false_string structure and fill it in with those
pointers.
Change-Id: I6eb3ee46bdc47bf42d6e913c72884f0eac22997e
Reviewed-on: https://code.wireshark.org/review/26353
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Code *outside* this file isn't allowed to free or overwrite the
structure members in question; code *inside* this file only does so when
it's appropriate, so we just cast away the warnings.
Use free_string_like_preference() in one place where the code was
duplicated; add a pref_set_string_like_pref_value() routine to
encapsulate the freeing.
Remove some unnecessary casts.
Change-Id: Ifc30a919cbd331367f5932ad23c3a1ed7cd4579f
Reviewed-on: https://code.wireshark.org/review/26352
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
We don't use zlibstatic so exclude it from ALL_BUILD and Wireshrk.sln.
Change-Id: I9656b6f1c35e43cce89c8879f4521f6dc4a5cbdf
Reviewed-on: https://code.wireshark.org/review/26349
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
For the Visual Studio generator, setting the EXCLUDE_FROM_ALL property on
a target excludes it from ALL_BUILD.vcxproj, but we additionally need
to set EXCLUDE_FROM_DEFAULT_BUILD to exclude it from Wireshark.sln.
Do so for the test targets.
Change-Id: Icd328f75d4927e5b7bb65b1833da4724f63476b6
Reviewed-on: https://code.wireshark.org/review/26345
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
These updates fix the incorrect "malformed packet" errors.
The updates include Gryphon Protocol commands that were
not included in the prior version of the Gryphon dissector.
Specifically, added LIN Protocol commands for LDF files,
LIN ioctls, LIN signal conversion commands, and USDT
ISO-15765-2 commands.
Change-Id: I746aa871d8496f3a73374eefd52ed900a069d16b
Reviewed-on: https://code.wireshark.org/review/26269
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
- support vendor specific commands with a dissector table
- add missing command IDs
- add expert warnings for unsupported and unknown command IDs
- fix indentation
- correct spelling issues
- small consistency changes
Change-Id: Ifbe4a8aab1e5c953c1d3d264ab4f0913e6936e7f
Reviewed-on: https://code.wireshark.org/review/26341
Reviewed-by: Ed Beroset <beroset@ieee.org>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>