commit | a7747509705c08ecae869cbfd075b53f975144ee | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | Tue Feb 11 14:55:22 2025 +0100 |
committer | Tom Rini <trini@konsulko.com> | Tue Feb 18 12:30:32 2025 -0600 |
tree | 614d639171a8ad4363189ee5093956056db0caa5 | |
parent | 41a54468ce474433826aa136e995165f96efc0d6 [diff] |
tools: use cryptographically safe RNG The PRNG implementing the random() function only has 2^31 states and therefore is unsafe to use for cryptography. Use arc4random() instead. Fixes: cc34f04efd63 ("tools: image-host.c: use random instead of rand") Addresses-Coverity-ID: 312953 Calling risky function Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>