The following issues were found
collectors/ebpf.plugin/ebpf_swap.h
1 issues
Line: 21
Column: 14
CWE codes:
120
20
#define NETDATA_DIRECTORY_SWAP_CONFIG_FILE "swap.conf"
typedef struct netdata_publish_swap {
uint64_t read;
uint64_t write;
} netdata_publish_swap_t;
enum swap_tables {
NETDATA_PID_SWAP_TABLE,
Reported by FlawFinder.
collectors/proc.plugin/proc_vmstat.c
1 issues
Line: 35
Column: 9
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
static unsigned long long oom_kill = 0ULL;
if(unlikely(!ff)) {
char filename[FILENAME_MAX + 1];
snprintfz(filename, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/proc/vmstat");
ff = procfile_open(config_get("plugin:proc:/proc/vmstat", "filename to monitor", filename), " \t:", PROCFILE_FLAG_DEFAULT);
if(unlikely(!ff)) return 1;
}
Reported by FlawFinder.
collectors/proc.plugin/sys_devices_system_edac_mc.c
1 issues
Line: 27
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
static struct mc *mc_root = NULL;
static void find_all_mc() {
char name[FILENAME_MAX + 1];
snprintfz(name, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/sys/devices/system/edac/mc");
char *dirname = config_get("plugin:proc:/sys/devices/system/edac/mc", "directory to monitor", name);
DIR *dir = opendir(dirname);
if(unlikely(!dir)) {
Reported by FlawFinder.