Re: [chrony-dev] [sdl-chrony] NO_CAST.INTEGER_OVERFLOW in set_frequency function

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Tue, Oct 10, 2023 at 09:51:24PM +0300, Елена Быханова wrote:
> Dear colleagues! 
> 
> While analyzing the program code, we found the following: NO_CAST.INTEGER_OVERFLOW in sys_linux.c . 
> 
> The value of an arithmetic expression ' nominal_tick - required_delta_tick ' is a subject to overflow because its operands are not cast to a larger data type before perfoming arithmetic: 

The largest value that the tick variables can have is 11000. This
comes from the kernel. There is no need to cast it to long.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/