Browse Source
Merge pull request #849 from rouault/random_seed_toctou
random_seed.c: add a Coverity Scan suppression
tags/json-c-0.18-20240915
Eric Hawicz
GitHub
1 year ago
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
0 deletions
-
random_seed.c
|
|
@@ -229,6 +229,7 @@ static int get_dev_random_seed(int *seed) |
|
|
if ((buf.st_mode & S_IFCHR) == 0) |
|
|
if ((buf.st_mode & S_IFCHR) == 0) |
|
|
return -1; |
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
/* coverity[toctou] */ |
|
|
int fd = open(dev_random_file, O_RDONLY); |
|
|
int fd = open(dev_random_file, O_RDONLY); |
|
|
if (fd < 0) |
|
|
if (fd < 0) |
|
|
{ |
|
|
{ |
|
|
|