Просмотр исходного кода

coroparse: Suppress coverity toctou error

TOCTOU issue really exists, but it's not a really problem.

Solution would be to open file and then call fstat, but I don't think
it's really worth the trouble so rather add coverity specific comment
to suppress this error.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 6 месяцев назад
Родитель
Сommit
62f9dc54f8
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      exec/coroparse.c

+ 1 - 0
exec/coroparse.c

@@ -1753,6 +1753,7 @@ static int read_uidgid_files_into_icmap(
 
 			goto error_exit;
 		}
+		// coverity[TOCTOU:SUPPRESS] not really problem
 		res = stat (filename, &stat_buf);
 		if (res == 0 && S_ISREG(stat_buf.st_mode)) {