Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/irqbalance-1.7.0/bitmap.c Examining data/irqbalance-1.7.0/bitmap.h Examining data/irqbalance-1.7.0/classify.c Examining data/irqbalance-1.7.0/constants.h Examining data/irqbalance-1.7.0/cpumask.h Examining data/irqbalance-1.7.0/irqbalance.c Examining data/irqbalance-1.7.0/irqbalance.h Examining data/irqbalance-1.7.0/irqlist.c Examining data/irqbalance-1.7.0/non-atomic.h Examining data/irqbalance-1.7.0/numa.c Examining data/irqbalance-1.7.0/placement.c Examining data/irqbalance-1.7.0/procinterrupts.c Examining data/irqbalance-1.7.0/types.h Examining data/irqbalance-1.7.0/ui/helpers.c Examining data/irqbalance-1.7.0/ui/helpers.h Examining data/irqbalance-1.7.0/ui/irqbalance-ui.c Examining data/irqbalance-1.7.0/ui/irqbalance-ui.h Examining data/irqbalance-1.7.0/ui/ui.c Examining data/irqbalance-1.7.0/ui/ui.h Examining data/irqbalance-1.7.0/activate.c Examining data/irqbalance-1.7.0/cputree.c FINAL RESULTS: data/irqbalance-1.7.0/classify.c:192:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", devpath, file); data/irqbalance-1.7.0/classify.c:365:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/numa_node", devpath); data/irqbalance-1.7.0/classify.c:376:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/local_cpus", devpath); data/irqbalance-1.7.0/classify.c:476:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "exec %s %s %d", script, path, irq); data/irqbalance-1.7.0/classify.c:477:11: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. output = popen(cmd, "r"); data/irqbalance-1.7.0/classify.c:631:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s/msi_irqs", SYSPCI_DIR, dirname); data/irqbalance-1.7.0/classify.c:632:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(devpath, "%s/%s", SYSPCI_DIR, dirname); data/irqbalance-1.7.0/classify.c:655:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s/irq", SYSPCI_DIR, dirname); data/irqbalance-1.7.0/irqbalance.c:382:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(*stats + strlen(*stats), "TYPE %d NUMBER %d LOAD %lu SAVE_MODE %d %s", data/irqbalance-1.7.0/irqbalance.h:142:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, ##args); \ data/irqbalance-1.7.0/irqbalance.h:145:4: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. syslog(lvl, fmt, ##args); \ data/irqbalance-1.7.0/irqbalance.h:147:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, ##args); \ data/irqbalance-1.7.0/irqbalance.h:154:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, ##args); \ data/irqbalance-1.7.0/irqbalance.h:157:4: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. syslog(lvl, fmt, ##args); \ data/irqbalance-1.7.0/irqbalance.h:159:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, ##args); \ data/irqbalance-1.7.0/numa.c:57:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/node%d/cpumap", SYSFS_NODE_PATH, nodeid); data/irqbalance-1.7.0/procinterrupts.c:75:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(path, name); data/irqbalance-1.7.0/cputree.c:124:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv("IRQBALANCE_BANNED_CPUS"); data/irqbalance-1.7.0/irqbalance.c:122:16: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt_long(argc, argv, data/irqbalance-1.7.0/irqbalance.c:606:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("IRQBALANCE_ONESHOT")) data/irqbalance-1.7.0/irqbalance.c:609:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("IRQBALANCE_DEBUG")) { data/irqbalance-1.7.0/activate.c:38:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX]; data/irqbalance-1.7.0/activate.c:40:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "/proc/irq/%i/smp_affinity", info->irq); data/irqbalance-1.7.0/activate.c:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX]; data/irqbalance-1.7.0/activate.c:72:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "/proc/irq/%i/smp_affinity", info->irq); data/irqbalance-1.7.0/activate.c:73:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(buf, "w"); data/irqbalance-1.7.0/bitmap.h:231:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, len); data/irqbalance-1.7.0/classify.c:189:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/irqbalance-1.7.0/classify.c:336:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/irqbalance-1.7.0/classify.c:470:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[128]; data/irqbalance-1.7.0/classify.c:502:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char script[1024]; data/irqbalance-1.7.0/classify.c:628:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/irqbalance-1.7.0/classify.c:629:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char devpath[PATH_MAX]; data/irqbalance-1.7.0/cputree.c:68:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(path, "r"); data/irqbalance-1.7.0/cputree.c:110:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/irqbalance-1.7.0/cputree.c:259:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_path[PATH_MAX]; data/irqbalance-1.7.0/cputree.c:278:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cpunr = atoi(cpunrptr); data/irqbalance-1.7.0/cputree.c:455:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/irqbalance-1.7.0/cputree.c:504:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_path[PATH_MAX]; data/irqbalance-1.7.0/irqbalance.c:48:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char socket_name[64]; data/irqbalance-1.7.0/irqbalance.c:343:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(*irqdata + strlen(*irqdata), data/irqbalance-1.7.0/irqbalance.c:393:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[500]; data/irqbalance-1.7.0/irqbalance.c:500:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char banned[512]; data/irqbalance-1.7.0/irqbalance.c:645:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (pidfile && (pidfd = open(pidfile, data/irqbalance-1.7.0/irqbalance.c:648:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/irqbalance-1.7.0/numa.c:44:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/irqbalance-1.7.0/numa.c:137:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/irqbalance-1.7.0/procinterrupts.c:58:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[512]; data/irqbalance-1.7.0/procinterrupts.c:74:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(path, "/sys/devices/platform/"); data/irqbalance-1.7.0/procinterrupts.c:122:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[256]; data/irqbalance-1.7.0/procinterrupts.c:159:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen("/proc/interrupts", "r"); data/irqbalance-1.7.0/procinterrupts.c:247:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen("/proc/interrupts", "r"); data/irqbalance-1.7.0/procinterrupts.c:438:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen("/proc/stat", "r"); data/irqbalance-1.7.0/ui/irqbalance-ui.c:42:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(CMSG_DATA(cmsg), credentials, sizeof(struct ucred)); data/irqbalance-1.7.0/ui/irqbalance-ui.c:408:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmdfile[512]; data/irqbalance-1.7.0/ui/irqbalance-ui.c:409:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmdstring[256]; data/irqbalance-1.7.0/ui/irqbalance-ui.c:415:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(cmdfile, "r"); data/irqbalance-1.7.0/ui/ui.c:23:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char top[COLS]; data/irqbalance-1.7.0/ui/ui.c:37:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char footer[COLS]; data/irqbalance-1.7.0/ui/ui.c:172:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char banned_cpus[1024] = "Banned CPU numbers: \0"; data/irqbalance-1.7.0/ui/ui.c:292:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char settings_string[1024] = "settings cpus \0"; data/irqbalance-1.7.0/ui/ui.c:330:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char assigned_to[128] = "\0"; data/irqbalance-1.7.0/ui/ui.c:494:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char settings_string[1024] = BAN_IRQS; data/irqbalance-1.7.0/ui/ui.c:564:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char info[128] = "Current sleep interval between rebalancing: \0"; data/irqbalance-1.7.0/ui/ui.c:590:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char settings_data[128]; data/irqbalance-1.7.0/ui/ui.c:663:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char indent[32] = " \0"; data/irqbalance-1.7.0/ui/ui.c:680:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char indent[32] = "\0"; data/irqbalance-1.7.0/ui/ui.c:689:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char copy_to[1024]; data/irqbalance-1.7.0/classify.c:472:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmd = alloca(strlen(path)+strlen(script)+64); data/irqbalance-1.7.0/classify.c:472:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmd = alloca(strlen(path)+strlen(script)+64); data/irqbalance-1.7.0/cputree.c:93:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cpumask_parse_user(line, strlen(line), *(cpumask_t *)mask); data/irqbalance-1.7.0/cputree.c:98:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(line) && line[0] != '\n') data/irqbalance-1.7.0/cputree.c:99:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cpulist_parse(line, strlen(line), *(cpumask_t *)mask); data/irqbalance-1.7.0/cputree.c:121:4: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(banned_cpumask_from_ui), banned_cpus); data/irqbalance-1.7.0/cputree.c:125:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (env && strlen(env)) { data/irqbalance-1.7.0/cputree.c:126:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cpumask_parse_user(env, strlen(env), banned_cpus); data/irqbalance-1.7.0/cputree.c:255:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define ADJ_SIZE(r,s) PATH_MAX-strlen(r)-strlen(#s) data/irqbalance-1.7.0/cputree.c:255:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define ADJ_SIZE(r,s) PATH_MAX-strlen(r)-strlen(#s) data/irqbalance-1.7.0/irqbalance.c:165:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(optarg, "off", strlen(optarg))) data/irqbalance-1.7.0/irqbalance.c:336:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newptr = realloc(*irqdata, strlen(*irqdata) + 24 + 1 + 11 + 20 + 20 + 11); data/irqbalance-1.7.0/irqbalance.c:343:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf(*irqdata + strlen(*irqdata), data/irqbalance-1.7.0/irqbalance.c:359:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). irqdlen = irq_data ? strlen(irq_data) : 0; data/irqbalance-1.7.0/irqbalance.c:372:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newptr = realloc(*stats, strlen(*stats) + irqdlen + 31 + 11 + 20 + 11 + 1); data/irqbalance-1.7.0/irqbalance.c:382:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf(*stats + strlen(*stats), "TYPE %d NUMBER %d LOAD %lu SAVE_MODE %d %s", data/irqbalance-1.7.0/irqbalance.c:434:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(buff, "stats", strlen("stats"))) { data/irqbalance-1.7.0/irqbalance.c:437:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). send(sock, stats, strlen(stats), 0); data/irqbalance-1.7.0/irqbalance.c:440:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(buff, "settings ", strlen("settings "))) { data/irqbalance-1.7.0/irqbalance.c:441:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(strncmp(buff + strlen("settings "), "sleep ", data/irqbalance-1.7.0/irqbalance.c:442:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen("sleep ")))) { data/irqbalance-1.7.0/irqbalance.c:444:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(char) * (recv_size - strlen("settings sleep "))); data/irqbalance-1.7.0/irqbalance.c:448:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sleep_string, buff + strlen("settings sleep "), data/irqbalance-1.7.0/irqbalance.c:448:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(sleep_string, buff + strlen("settings sleep "), data/irqbalance-1.7.0/irqbalance.c:449:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). recv_size - strlen("settings sleep ")); data/irqbalance-1.7.0/irqbalance.c:455:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (!(strncmp(buff + strlen("settings "), "ban irqs ", data/irqbalance-1.7.0/irqbalance.c:456:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen("ban irqs ")))) { data/irqbalance-1.7.0/irqbalance.c:459:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(char) * (recv_size - strlen("settings ban irqs "))); data/irqbalance-1.7.0/irqbalance.c:463:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(irq_string, buff + strlen("settings ban irqs "), data/irqbalance-1.7.0/irqbalance.c:463:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(irq_string, buff + strlen("settings ban irqs "), data/irqbalance-1.7.0/irqbalance.c:464:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). recv_size - strlen("settings ban irqs ")); data/irqbalance-1.7.0/irqbalance.c:468:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(irq_string, "NONE", strlen("NONE"))) { data/irqbalance-1.7.0/irqbalance.c:477:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (!(strncmp(buff + strlen("settings "), "cpus ", data/irqbalance-1.7.0/irqbalance.c:478:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen("cpus")))) { data/irqbalance-1.7.0/irqbalance.c:484:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(char) * (recv_size - strlen("settings cpus "))); data/irqbalance-1.7.0/irqbalance.c:488:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cpu_ban_string, buff + strlen("settings cpus "), data/irqbalance-1.7.0/irqbalance.c:488:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(cpu_ban_string, buff + strlen("settings cpus "), data/irqbalance-1.7.0/irqbalance.c:489:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). recv_size - strlen("settings cpus ")); data/irqbalance-1.7.0/irqbalance.c:491:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(banned_cpumask_from_ui, "NULL", strlen("NULL"))) { data/irqbalance-1.7.0/irqbalance.c:499:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(buff, "setup", strlen("setup"))) { data/irqbalance-1.7.0/irqbalance.c:501:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *setup = calloc(strlen("SLEEP ") + 11 + 1, 1); data/irqbalance-1.7.0/irqbalance.c:506:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(setup, strlen("SLEEP ") + 11 + 1, "SLEEP %d ", sleep_interval); data/irqbalance-1.7.0/irqbalance.c:511:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newptr = realloc(setup, strlen(setup) + strlen(banned) + 7 + 1); data/irqbalance-1.7.0/irqbalance.c:511:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newptr = realloc(setup, strlen(setup) + strlen(banned) + 7 + 1); data/irqbalance-1.7.0/irqbalance.c:516:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(setup + strlen(setup), strlen(banned) + 7 + 1, data/irqbalance-1.7.0/irqbalance.c:516:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(setup + strlen(setup), strlen(banned) + 7 + 1, data/irqbalance-1.7.0/irqbalance.c:518:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). send(sock, setup, strlen(setup), 0); data/irqbalance-1.7.0/irqbalance.c:549:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, socket_name, sizeof(addr.sun_path)); data/irqbalance-1.7.0/irqbalance.c:650:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write(pidfd, str, strlen(str)); data/irqbalance-1.7.0/procinterrupts.c:76:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(path, "/"); data/irqbalance-1.7.0/procinterrupts.c:88:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(ent->d_name, pdev_irq_info[i].d_name, strlen(pdev_irq_info[i].d_name))) { data/irqbalance-1.7.0/ui/irqbalance-ui.c:92:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). iov.iov_len = strlen(data); data/irqbalance-1.7.0/ui/irqbalance-ui.c:114:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). iov.iov_len = strlen(string); data/irqbalance-1.7.0/ui/irqbalance-ui.c:138:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if((setup_data == NULL) || (strlen(setup_data) == 0)) return; data/irqbalance-1.7.0/ui/irqbalance-ui.c:146:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "SLEEP", strlen("SLEEP"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:150:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while(!strncmp(token, "IRQ", strlen("IRQ"))) { data/irqbalance-1.7.0/ui/irqbalance-ui.c:154:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "LOAD", strlen("LOAD"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:157:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "DIFF", strlen("DIFF"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:160:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "CLASS", strlen("CLASS"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:169:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "BANNED", strlen("BANNED"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:171:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(i = strlen(token) - 1; i >= 0; i--) { data/irqbalance-1.7.0/ui/irqbalance-ui.c:176:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *banned_cpu = (4 * (strlen(token) - (i + 1)) + (4 - (j + 1))); data/irqbalance-1.7.0/ui/irqbalance-ui.c:263:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!data || strlen(data) == 0) data/irqbalance-1.7.0/ui/irqbalance-ui.c:273:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "TYPE", strlen("TYPE"))) { data/irqbalance-1.7.0/ui/irqbalance-ui.c:289:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "NUMBER", strlen("NUMBER"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:292:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "LOAD", strlen("LOAD"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:295:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "SAVE_MODE", strlen("SAVE_MODE"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:300:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while((token != NULL) && (!strncmp(token, "IRQ", strlen("IRQ")))) { data/irqbalance-1.7.0/ui/irqbalance-ui.c:304:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "LOAD", strlen("LOAD"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:307:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "DIFF", strlen("DIFF"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:310:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strncmp(token, "CLASS", strlen("CLASS"))) goto out; data/irqbalance-1.7.0/ui/irqbalance-ui.c:318:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if((token == NULL) || (strncmp(token, "IRQ", strlen("IRQ")))) { data/irqbalance-1.7.0/ui/ui.c:25:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while(strlen(top) != (size_t)COLS - 1) { data/irqbalance-1.7.0/ui/ui.c:26:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(top + strlen(top), COLS - strlen(top), " "); data/irqbalance-1.7.0/ui/ui.c:26:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(top + strlen(top), COLS - strlen(top), " "); data/irqbalance-1.7.0/ui/ui.c:40:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while(strlen(footer) != (size_t)COLS - 1) { data/irqbalance-1.7.0/ui/ui.c:41:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(footer + strlen(footer), COLS - strlen(footer), " "); data/irqbalance-1.7.0/ui/ui.c:41:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(footer + strlen(footer), COLS - strlen(footer), " "); data/irqbalance-1.7.0/ui/ui.c:167:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(data + strlen(data), 1024 - strlen(data), "%d, ", *banned_cpu); data/irqbalance-1.7.0/ui/ui.c:167:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(data + strlen(data), 1024 - strlen(data), "%d, ", *banned_cpu); data/irqbalance-1.7.0/ui/ui.c:175:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(banned_cpus + strlen(banned_cpus) - 2, data/irqbalance-1.7.0/ui/ui.c:176:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). 1024 - strlen(banned_cpus), "\n"); data/irqbalance-1.7.0/ui/ui.c:178:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(banned_cpus + strlen(banned_cpus), data/irqbalance-1.7.0/ui/ui.c:179:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). 1024 - strlen(banned_cpus), "None\n"); data/irqbalance-1.7.0/ui/ui.c:205:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(mask_data + strlen(mask_data), 1024 - strlen(mask_data), data/irqbalance-1.7.0/ui/ui.c:205:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(mask_data + strlen(mask_data), 1024 - strlen(mask_data), data/irqbalance-1.7.0/ui/ui.c:295:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(settings_string + strlen(settings_string), data/irqbalance-1.7.0/ui/ui.c:295:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(settings_string + strlen(settings_string), data/irqbalance-1.7.0/ui/ui.c:296:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). "NULL", 1024 - strlen(settings_string)); data/irqbalance-1.7.0/ui/ui.c:322:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(data + strlen(data), 128 - strlen(data), "%d, ", *number); data/irqbalance-1.7.0/ui/ui.c:322:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(data + strlen(data), 128 - strlen(data), "%d, ", *number); data/irqbalance-1.7.0/ui/ui.c:332:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assigned_to[strlen(assigned_to) - 2] = '\0'; data/irqbalance-1.7.0/ui/ui.c:404:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(ban_list + strlen(ban_list), 1024 - strlen(ban_list), data/irqbalance-1.7.0/ui/ui.c:404:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(ban_list + strlen(ban_list), 1024 - strlen(ban_list), data/irqbalance-1.7.0/ui/ui.c:497:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(settings_string + strlen(settings_string), data/irqbalance-1.7.0/ui/ui.c:497:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(settings_string + strlen(settings_string), data/irqbalance-1.7.0/ui/ui.c:498:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). " NONE", 1024 - strlen(settings_string)); data/irqbalance-1.7.0/ui/ui.c:565:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uint8_t sleep_input_offset = strlen(info) + 3; data/irqbalance-1.7.0/ui/ui.c:566:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(info + strlen(info), 128 - strlen(info), "%lu\n", setup.sleep); data/irqbalance-1.7.0/ui/ui.c:566:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(info + strlen(info), 128 - strlen(info), "%lu\n", setup.sleep); data/irqbalance-1.7.0/ui/ui.c:664:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", (char *)data); data/irqbalance-1.7.0/ui/ui.c:664:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", (char *)data); data/irqbalance-1.7.0/ui/ui.c:683:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", spaces); data/irqbalance-1.7.0/ui/ui.c:683:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", spaces); data/irqbalance-1.7.0/ui/ui.c:685:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), " "); data/irqbalance-1.7.0/ui/ui.c:685:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), " "); data/irqbalance-1.7.0/ui/ui.c:688:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", asciitree); data/irqbalance-1.7.0/ui/ui.c:688:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", asciitree); ANALYSIS SUMMARY: Hits = 176 Lines analyzed = 6336 in approximately 0.18 seconds (35427 lines/second) Physical Source Lines of Code (SLOC) = 4678 Hits@level = [0] 43 [1] 108 [2] 47 [3] 4 [4] 17 [5] 0 Hits@level+ = [0+] 219 [1+] 176 [2+] 68 [3+] 21 [4+] 17 [5+] 0 Hits/KSLOC@level+ = [0+] 46.8149 [1+] 37.6229 [2+] 14.5361 [3+] 4.4891 [4+] 3.63403 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.