Re: [chrony-dev] [sdl-chrony] NO_CAST.INTEGER_OVERFLOW in set_frequency function |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [sdl-chrony] NO_CAST.INTEGER_OVERFLOW in set_frequency function
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Wed, 11 Oct 2023 09:33:56 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697009640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d8Qcv+RAFhVpidIx1BqSnwjwg81FlpQgWJ7JC0CxCkY=; b=BERZDLw7/dWKpp85zT0jO8qfEmqOD10CXQ4/rO+bsVXEj4VHUfrSu4B6+2U+0VGvLGzuel Sm3jnzlFzMLJEJHsHVaXU1dxRwSK3wyGVXp/p88/NQKz72+bNWxdSstuMHSuVd5Yf+KyUe 4YXh9w+ghkbzh0WcsnOKPcNp8kfg/uo=
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.