rcinput:killTimer check if iterator is not corrupted, possible segfault

Origin commit data
------------------
Branch: ni/coolstream
Commit: a8d0b49aed
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-10-13 (Sun, 13 Oct 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2019-10-13 22:24:13 +02:00
committed by vanhofen
parent bf91f10b5a
commit d0765efa4f

View File

@@ -524,12 +524,13 @@ int CRCInput::checkTimers()
else else
_newtimer.times_out = e->times_out + e->interval; _newtimer.times_out = e->times_out + e->interval;
timers.erase(e); timers.erase(e);
for ( e= timers.begin(); e!= timers.end(); ++e ) for ( e= timers.begin(); e!= timers.end(); ++e )
if ( e->times_out> _newtimer.times_out ) if ( e->times_out> _newtimer.times_out )
break; break;
timers.insert(e, _newtimer); if(e != timers.end())
timers.insert(e, _newtimer);
} }
else else
timers.erase(e); timers.erase(e);