从文件中读取整数值时,覆盖率检查出现以下错误
调用函数“fread”污染参数“readval”
//coverity note: Calling function "fread" taints argument "readval".
if(fread(&readval, sizeof(int), 1, fp) < 1) {
return;
} else {
//coverity note: Passing tainted variable "readval" to a tainted sink.
f1(&readval);
}
如何处理这个错误?我需要为“readval”执行什么健全性检查以确保它没有损坏。