|
|
|
@ -475,6 +475,7 @@ ConfYamlLoadFileWithPrefix(const char *filename, const char *prefix)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct stat stat_buf;
|
|
|
|
struct stat stat_buf;
|
|
|
|
|
|
|
|
/* coverity[toctou] */
|
|
|
|
if (stat(filename, &stat_buf) == 0) {
|
|
|
|
if (stat(filename, &stat_buf) == 0) {
|
|
|
|
if (stat_buf.st_mode & S_IFDIR) {
|
|
|
|
if (stat_buf.st_mode & S_IFDIR) {
|
|
|
|
SCLogError(SC_ERR_FATAL, "yaml argument is not a file but a directory: %s. "
|
|
|
|
SCLogError(SC_ERR_FATAL, "yaml argument is not a file but a directory: %s. "
|
|
|
|
@ -483,6 +484,7 @@ ConfYamlLoadFileWithPrefix(const char *filename, const char *prefix)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* coverity[toctou] */
|
|
|
|
infile = fopen(filename, "r");
|
|
|
|
infile = fopen(filename, "r");
|
|
|
|
if (infile == NULL) {
|
|
|
|
if (infile == NULL) {
|
|
|
|
SCLogError(SC_ERR_FATAL, "failed to open file: %s: %s", filename,
|
|
|
|
SCLogError(SC_ERR_FATAL, "failed to open file: %s: %s", filename,
|
|
|
|
|