URL: 
https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b5ee450455e312146abe99a19d84d501902db080
Submitter: Alexis La Goutte (alexis.lagou...@gmail.com)
Changed: branch: master-2.2
Repository: wireshark

Commits:

b5ee450 by Peter Wu (pe...@lekensteyn.nl):

    Qt: fix crash on clearing dfilter after capture restart
    
    Since v2.1.2rc0-1-gaf5daa6 ("Qt: Replace a QMap with a QVector."), the
    following error could be observed:
    
        ASSERT failure in QVector<T>::operator[]: "index out of range", file 
/usr/include/qt/QtCore/qvector.h, line 433
        Aborted (core dumped)
    
    It happens when a capture filter is present and a live capture is
    restarted. Then the number_to_row_ structure would be truncated which
    results in an invalid access.
    
    Fix this by always checking the length before inserting a new mapping.
    Do it inside the loop to prevent an unlikely race condition where more
    than 10000 packets are received before the next iteration.
    
    Store "row number + 1" to avoid having to initialize the new elements
    from resize() with -1, the default value is 0 which is good now.
    
    Bug: 12929
    Change-Id: I88ce955a3551508e773eeadddc6f89bbb583acaf
    Reviewed-on: https://code.wireshark.org/review/17111
    Reviewed-by: Gerald Combs <ger...@wireshark.org>
    Petri-Dish: Peter Wu <pe...@lekensteyn.nl>
    Tested-by: Petri Dish Buildbot <buildbot-no-re...@wireshark.org>
    Reviewed-by: Anders Broman <a.broma...@gmail.com>
    (cherry picked from commit b6f73f2567854b1ea417957d7ea5de32b1989aa3)
    Reviewed-on: https://code.wireshark.org/review/17844
    Reviewed-by: Pascal Quantin <pascal.quan...@gmail.com>
    Petri-Dish: Pascal Quantin <pascal.quan...@gmail.com>
    Reviewed-by: Alexis La Goutte <alexis.lagou...@gmail.com>
    

Actions performed:

    from  61ad380   dmp: Restore checksum incorrect info
    adds  b5ee450   Qt: fix crash on clearing dfilter after capture restart


Summary of changes:
 ui/qt/packet_list_model.cpp |   36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)
___________________________________________________________________________
Sent via:    Wireshark-commits mailing list <wireshark-commits@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-commits
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-commits
             mailto:wireshark-commits-requ...@wireshark.org?subject=unsubscribe

Reply via email to