From 3544731cfaade37f288c3b344c8dbc02c08e6bac Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 31 Dec 2019 09:35:10 -0800 Subject: [PATCH] Suppress a Coverity taint warning in check_status_file() Suppress the following Coverity complaint: CID 24143 (#1 of 1): Use of untrusted string value (TAINTED_STRING) tainted_string: Passing tainted string fio_status_file_path to unlink, which cannot accept tainted data. Signed-off-by: Bart Van Assche --- stat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stat.c b/stat.c index 05663e07..e2bc8ddb 100644 --- a/stat.c +++ b/stat.c @@ -2123,6 +2123,9 @@ static int check_status_file(void) } if (temp_dir == NULL) temp_dir = "/tmp"; +#ifdef __COVERITY__ + __coverity_tainted_data_sanitize__(temp_dir); +#endif snprintf(fio_status_file_path, sizeof(fio_status_file_path), "%s/%s", temp_dir, FIO_STATUS_FILE); -- 2.25.1