From: Even Rouault Date: Sun, 7 Jan 2024 19:55:35 +0000 (+0100) Subject: random_seed.c: add a Coverity Scan suppression X-Git-Tag: json-c-0.18-20240915~17^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F849%2Fhead;p=thirdparty%2Fjson-c.git random_seed.c: add a Coverity Scan suppression Coverity Scan warns about the use of open() after stat() being a potential TOCTOU (Time of check time of use) issue. But here there is no such issue. --- diff --git a/random_seed.c b/random_seed.c index 5b2155db..a033fac2 100644 --- a/random_seed.c +++ b/random_seed.c @@ -229,6 +229,7 @@ static int get_dev_random_seed(int *seed) if ((buf.st_mode & S_IFCHR) == 0) return -1; + /* coverity[toctou] */ int fd = open(dev_random_file, O_RDONLY); if (fd < 0) {