Wireshark-commits: [Wireshark-commits] master f5c70db: extcap: Check for valid PID before killing c

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 01 Feb 2020 17:51:09 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f5c70db3b431d128a49a65a782874e7fa55d12a6
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

f5c70db by Mikael Kanstrup (mikael.kanstrup@xxxxxxxx):

    extcap: Check for valid PID before killing child process
    
    If an extcap tool fails to start or the tool exits unexpectedly
    Wireshark will try to kill PID -1. This has very unexpected results
    on Linux, like bringing down the whole window manager.
    
    Make sure it's a valid PID before killing the extcap child process.
    
    Bug: 16362
    Change-Id: I58c0cb409fec3f35d3c76d841e2430a2f8742301
    Fixes: v3.3.0rc0-461-g8efde39805 ("extcap: terminate the child process using kill.")
    Reviewed-on: https://code.wireshark.org/review/35998
    Reviewed-by: Pascal Quantin <pascal@xxxxxxxxxxxxx>
    Petri-Dish: Pascal Quantin <pascal@xxxxxxxxxxxxx>
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Dario Lombardo <lomato@xxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  4ef8ace   PDCP NR: call NR RRC dissector for signalling payload
     add  f5c70db   extcap: Check for valid PID before killing child process


Summary of changes:
 extcap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)