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

Commits:

af1b4cc 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 ba50c5a5f6b0edb6b06496de9c3f9d5b18f6cd1e)
    Reviewed-on: https://code.wireshark.org/review/36919
    Petri-Dish: Roland Knall <rknall@xxxxxxxxx>
    

Actions performed:

    from  e51423c   [Automatic update for 2020-04-19]
     add  af1b4cc   Check the validator in ExtArgText::isValid().


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