mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
rcinput: avoid theoretically possible timerid overflow
Origin commit data
------------------
Branch: ni/coolstream
Commit: 164ab9ab42
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-12-22 (Sun, 22 Dec 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -367,6 +367,11 @@ int CRCInput::addTimer(uint64_t Interval, bool oneshot, bool correct_time )
|
||||
_newtimer.interval = 0;
|
||||
|
||||
_newtimer.id = timerid++;
|
||||
/* in theory, this uint32_t could overflow... */
|
||||
/* ...and timerid == 0 is used as "no timer" in many places. */
|
||||
if (timerid == 0)
|
||||
timerid++;
|
||||
|
||||
if ( correct_time )
|
||||
_newtimer.times_out = timeNow+ Interval;
|
||||
else
|
||||
|
Reference in New Issue
Block a user