diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-10-04 12:45:21 +0200 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-10-04 18:44:34 +0000 |
commit | 89b227f44edf224e9f4478947319f7fffe74fcf3 (patch) | |
tree | e61bed2c7294e91f2e0ab9d4e0784f951e00e31b | |
parent | 076d07d9faed0fa694a6af204ba9978bac6e44a5 (diff) |
qt: fix crash when dragging RTP player out of view
Fix invalid memory access when dragging the RTP player out of view when
a stream is selected. lowerBound() returns QMap.end() when no item is
found, use that instead.
Found using ASAN.
Change-Id: I5444a047bc242dfe481bd0581c5217030fca28f1
Reviewed-on: https://code.wireshark.org/review/10778
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r-- | ui/qt/rtp_audio_stream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp index 2945281c6b..5f9c4c8c0e 100644 --- a/ui/qt/rtp_audio_stream.cpp +++ b/ui/qt/rtp_audio_stream.cpp @@ -316,7 +316,7 @@ quint32 RtpAudioStream::nearestPacket(double timestamp, bool is_relative) if (!is_relative) timestamp -= start_abs_offset_; QMap<double, quint32>::const_iterator it = packet_timestamps_.lowerBound(timestamp); - if (it == packet_timestamps_.begin()) return 0; + if (it == packet_timestamps_.end()) return 0; return it.value(); } |