[LyX/master] Do not use rand() to set a BranchList id
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Fri Sep 13 10:23:55 UTC 2024
Le 13/09/2024 à 11:37, Pavel Sanda a écrit :
> On Fri, Sep 13, 2024 at 11:14:13AM +0200, Jean-Marc Lasgouttes wrote:
>> Le 13/09/2024 ?? 11:11, Jean-Marc Lasgouttes a écrit :
>>> commit 9f40eaee15d53ce418a728d3ff3716541d35775f
>>> Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
>>> Date: Fri Sep 13 11:07:05 2024 +0200
>>>
>>> Do not use rand() to set a BranchList id
>>> Use a simple counting instead, beecause Coverity complains that rand()
>>> is not safe, and counting is siimpler anyway.
>
> What does it mean rand is not safe? Thread safe? Or not necessarily giving
> unique result?
No, Coverity mumbles about security blah blah, cryptography blah blah.
Independently of that, I think that the new code makes more sense:
number the lists, do not give them an arbitrary ten-digit id.
JMarc
More information about the lyx-devel
mailing list