修复非法rtp数据导致空指针崩溃问题 (#4226)
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled

This commit is contained in:
xiongguangjie 2025-04-07 20:50:03 +08:00 committed by GitHub
parent 3351aedeee
commit fd4f00dd63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -188,8 +188,14 @@ private:
}
iterator popIterator(iterator it) {
output(it->first, std::move(it->second));
return _pkt_sort_cache_map.erase(it);
try {
output(it->first, std::move(it->second));
return _pkt_sort_cache_map.erase(it);
} catch (...) {
// 防止抛异常未移除迭代器导致rtp包为空
_pkt_sort_cache_map.erase(it);
throw;
}
}
void output(SEQ seq, T packet) {