Wireshark-commits: [Wireshark-commits] master-3.2 3f4e014: Check the validator in ExtArgText::isVal
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 24 Apr 2020 17:41:33 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3f4e014dc182f664d0268570258cd72968bc25f7
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark

Commits:

3f4e014 by Guy Harris (guy@xxxxxxxxxxxx):

    Check the validator in ExtArgText::isValid().
    
    The validator doesn't prevent the input focus from being transferred out
    of the QLineEdit, and it merely prevents the user from entering a value
    that's considered "invalid" rather than "not valid but "intermediate"".
    
    For QIntValidator(), values that have more digits than the maximum value
    are "invalid", but values that have the same number of digits but that
    are larger are just "intermediate".
    
    This means the user will be able to send such a value to the extcap
    module.
    
    So we explicitly check the validator in ExtArgText::isValid(), so that
    1) we provide visual feedback (at least to people who can detect a red
    background) for out-of-range values that don't have too many digits and
    2) prevent them from being treated as valid and passed to the extcap
    module.
    
    Bug: 16510
    Change-Id: Ie5b90cf5dbb57c91744f6a28a71674b65ef21bb6
    Reviewed-on: https://code.wireshark.org/review/36914
    Petri-Dish: Guy Harris <gharris@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
    Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
    (cherry picked from commit 8d4844a1da585a23776634c74ed87c8cb5993abb)
    Reviewed-on: https://code.wireshark.org/review/36918
    Petri-Dish: Roland Knall <rknall@xxxxxxxxx>
    

Actions performed:

    from  6643c56   [Automatic update for 2020-04-19]
     add  3f4e014   Check the validator in ExtArgText::isValid().


Summary of changes:
 ui/qt/extcap_argument.cpp | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)