mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Fix warnings reported by static analysis.
- ensure that strings are \0 terminated (most of this is already handled on higher level anyway) - fix resource leak in error path in tcrypt.c - fix time of check/time of use race in sysfs path processing - insruct Coverity scanner to ignore constant expression in random.c (it is intented to stop compile-time misconfiguration of RNG that would be fatal)
This commit is contained in:
@@ -234,9 +234,11 @@ void crypt_random_exit(void)
|
||||
|
||||
int crypt_random_default_key_rng(void)
|
||||
{
|
||||
/* coverity[pointless_string_compare] */
|
||||
if (!strcmp(DEFAULT_RNG, RANDOM_DEVICE))
|
||||
return CRYPT_RNG_RANDOM;
|
||||
|
||||
/* coverity[pointless_string_compare] */
|
||||
if (!strcmp(DEFAULT_RNG, URANDOM_DEVICE))
|
||||
return CRYPT_RNG_URANDOM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user