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>
This commit is contained in:
parent
076d07d9fa
commit
89b227f44e
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue