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/rt-tests-1.5/src/backfire/backfire.c Examining data/rt-tests-1.5/src/backfire/sendme.c Examining data/rt-tests-1.5/src/cyclictest/rt_numa.h Examining data/rt-tests-1.5/src/cyclictest/cyclictest.c Examining data/rt-tests-1.5/src/hackbench/hackbench.c Examining data/rt-tests-1.5/src/include/bionic.h Examining data/rt-tests-1.5/src/include/error.h Examining data/rt-tests-1.5/src/include/pip_stress.h Examining data/rt-tests-1.5/src/include/rt-sched.h Examining data/rt-tests-1.5/src/include/rt-utils.h Examining data/rt-tests-1.5/src/include/rt-get_cpu.h Examining data/rt-tests-1.5/src/lib/error.c Examining data/rt-tests-1.5/src/lib/rt-sched.c Examining data/rt-tests-1.5/src/lib/rt-utils.c Examining data/rt-tests-1.5/src/pi_tests/classic_pi.c Examining data/rt-tests-1.5/src/pi_tests/pi_stress.c Examining data/rt-tests-1.5/src/pi_tests/pip_stress.c Examining data/rt-tests-1.5/src/pi_tests/sigtest.c Examining data/rt-tests-1.5/src/pi_tests/tst-mutexpi10.c Examining data/rt-tests-1.5/src/pmqtest/pmqtest.c Examining data/rt-tests-1.5/src/ptsematest/ptsematest.c Examining data/rt-tests-1.5/src/queuelat/targeted-ipi/targeted-ipi.c Examining data/rt-tests-1.5/src/queuelat/queuelat.c Examining data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c Examining data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c Examining data/rt-tests-1.5/src/sched_deadline/deadline_test.c Examining data/rt-tests-1.5/src/signaltest/signaltest.c Examining data/rt-tests-1.5/src/sigwaittest/sigwaittest.c Examining data/rt-tests-1.5/src/ssdd/ssdd.c Examining data/rt-tests-1.5/src/svsematest/svsematest.c FINAL RESULTS: data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:558:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(path, "/tasks", MAXPATH - 1); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:783:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(path, "/tasks", MAXPATH - 1); data/rt-tests-1.5/src/cyclictest/cyclictest.c:332:8: [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(strcpy(path, tracing_prefix), name); data/rt-tests-1.5/src/cyclictest/cyclictest.c:332:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcat(strcpy(path, tracing_prefix), name); data/rt-tests-1.5/src/cyclictest/cyclictest.c:339:61: [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. static void tracemark(char *fmt, ...) __attribute__((format(printf, 1, 2))); data/rt-tests-1.5/src/cyclictest/cyclictest.c:351:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(tracebuf, TRACEBUFSIZ, fmt, ap); data/rt-tests-1.5/src/cyclictest/cyclictest.c:369:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", fileprefix, "trace_marker"); data/rt-tests-1.5/src/cyclictest/cyclictest.c:383:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", fileprefix, "tracing_on"); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1586:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, fmt, index, stat->tid, par->prio, data/rt-tests-1.5/src/cyclictest/cyclictest.c:1694:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, fmt, trig->tnum, trig->diff, trig->ts); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1697:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, fmt, trig->tnum, trig->diff, trig->ts); data/rt-tests-1.5/src/lib/error.c:92:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/rt-tests-1.5/src/lib/rt-utils.c:103:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "mount -t debugfs debugfs %s", mountpoint); data/rt-tests-1.5/src/lib/rt-utils.c:104:8: [4] (shell) system: 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. ret = system(cmd); data/rt-tests-1.5/src/lib/rt-utils.c:139:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%savailable_tracers", prefix); data/rt-tests-1.5/src/lib/rt-utils.c:212:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s%s", prefix, event); data/rt-tests-1.5/src/lib/rt-utils.c:240:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "events/%s/enable", event); data/rt-tests-1.5/src/lib/rt-utils.c:248:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "events/%s/enable", event); data/rt-tests-1.5/src/pi_tests/classic_pi.c:601:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/rt-tests-1.5/src/pi_tests/classic_pi.c:610:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/rt-tests-1.5/src/pi_tests/tst-mutexpi10.c:665:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (errout, fmt, ap); data/rt-tests-1.5/src/pi_tests/tst-mutexpi10.c:676:7: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf (fmt, ap); data/rt-tests-1.5/src/pmqtest/pmqtest.c:206:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tracing_enabled_file, get_debugfileprefix()); data/rt-tests-1.5/src/pmqtest/pmqtest.c:445:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(mqname, SYNCMQ_NAME, i); data/rt-tests-1.5/src/pmqtest/pmqtest.c:451:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(mqname, TESTMQ_NAME, i); data/rt-tests-1.5/src/pmqtest/pmqtest.c:573:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(mqname, SYNCMQ_NAME, i); data/rt-tests-1.5/src/pmqtest/pmqtest.c:577:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(mqname, TESTMQ_NAME, i); data/rt-tests-1.5/src/ptsematest/ptsematest.c:133:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tracing_enabled_file, get_debugfileprefix()); data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:83:6: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. n = vsnprintf(buff, BUFSIZ, fmt, ap); data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:133:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, BUFSIZ, fmt, ap); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:216:6: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. n = vsnprintf(buf, size, fmt, ap); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:247:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(files, "%s/tracing/trace_marker", debugfs); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:277:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(files, "%s/sched_features", debugfs); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:674:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, fmt, index, stat->tid, data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:1200:3: [4] (shell) system: 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. system("cat /sys/fs/cgroup/cpuset/my_cpuset/tasks"); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:374:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(files, "%s/tracing/trace_marker", debugfs); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:415:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(files, "%s/sched_features", debugfs); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1977:3: [4] (shell) system: 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. system("cat /sys/fs/cgroup/cpuset/my_cpuset/tasks"); data/rt-tests-1.5/src/signaltest/signaltest.c:102:3: [4] (shell) system: 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. system("echo 1 > /proc/sys/kernel/trace_all_cpus"); data/rt-tests-1.5/src/signaltest/signaltest.c:103:3: [4] (shell) system: 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. system("echo 1 > /proc/sys/kernel/trace_enabled"); data/rt-tests-1.5/src/signaltest/signaltest.c:104:3: [4] (shell) system: 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. system("echo 1 > /proc/sys/kernel/trace_freerunning"); data/rt-tests-1.5/src/signaltest/signaltest.c:105:3: [4] (shell) system: 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. system("echo 0 > /proc/sys/kernel/trace_print_at_crash"); data/rt-tests-1.5/src/signaltest/signaltest.c:106:3: [4] (shell) system: 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. system("echo 1 > /proc/sys/kernel/trace_user_triggered"); data/rt-tests-1.5/src/signaltest/signaltest.c:107:3: [4] (shell) system: 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. system("echo -1 > /proc/sys/kernel/trace_user_trigger_irq"); data/rt-tests-1.5/src/signaltest/signaltest.c:108:3: [4] (shell) system: 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. system("echo 0 > /proc/sys/kernel/trace_verbose"); data/rt-tests-1.5/src/signaltest/signaltest.c:109:3: [4] (shell) system: 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. system("echo 0 > /proc/sys/kernel/preempt_thresh"); data/rt-tests-1.5/src/signaltest/signaltest.c:110:3: [4] (shell) system: 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. system("echo 0 > /proc/sys/kernel/wakeup_timing"); data/rt-tests-1.5/src/signaltest/signaltest.c:111:3: [4] (shell) system: 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. system("echo 0 > /proc/sys/kernel/preempt_max_latency"); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:181:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tracing_enabled_file, get_debugfileprefix()); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:498:5: [4] (shell) execvp: 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. execvp(args[0], args); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:526:5: [4] (shell) execvp: 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. execvp(args[0], args); data/rt-tests-1.5/src/svsematest/svsematest.c:187:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tracing_enabled_file, get_debugfileprefix()); data/rt-tests-1.5/src/svsematest/svsematest.c:582:5: [4] (shell) execvp: 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. execvp(args[0], args); data/rt-tests-1.5/src/svsematest/svsematest.c:610:5: [4] (shell) execvp: 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. execvp(args[0], args); data/rt-tests-1.5/src/backfire/sendme.c:142:11: [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. int c = getopt_long (argc, argv, "a::b:i:l:p:", data/rt-tests-1.5/src/cyclictest/cyclictest.c:1178:11: [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. int c = getopt_long(argc, argv, "a::A::b:c:d:D:h:H:i:l:MNo:p:mqrRsSt::uvD:x", data/rt-tests-1.5/src/hackbench/hackbench.c:364:11: [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. int c = getopt_long(argc, argv, "ps:l:g:f:TPFh", data/rt-tests-1.5/src/pi_tests/classic_pi.c:201: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, "+", options, NULL)) != -1) { data/rt-tests-1.5/src/pi_tests/pi_stress.c:1326: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, "+hD:vqi:g:rs:pdVum", options, NULL)) != -1) { data/rt-tests-1.5/src/pmqtest/pmqtest.c:305:11: [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. int c = getopt_long (argc, argv, "a::b:d:f:i:l:D:p:St::T:", data/rt-tests-1.5/src/ptsematest/ptsematest.c:220:11: [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. int c = getopt_long (argc, argv, "a::b:d:i:l:D:p:St::", data/rt-tests-1.5/src/queuelat/queuelat.c:585:14: [3] (buffer) getopt: 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 ((c = getopt (argc, argv, "m:c:p:f:t:q:h")) != -1) data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:209:11: [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. int c = getopt_long (argc, argv, "p:r:s:m:l:D:ech", data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:1029:14: [3] (buffer) getopt: 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 ((c = getopt(argc, argv, "+hac:i:s:t:D:")) >= 0) { data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1738:14: [3] (buffer) getopt: 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 ((c = getopt(argc, argv, "+hbr:c:i:p:P:t:s:")) >= 0) { data/rt-tests-1.5/src/signaltest/signaltest.c:247:11: [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. int c = getopt_long (argc, argv, "b:c:d:i:l:D:np:qrsmt:v", data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:265:11: [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. int c = getopt_long (argc, argv, "a::b:d:f::i:l:D:p:t::", data/rt-tests-1.5/src/svsematest/svsematest.c:296:11: [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. int c = getopt_long (argc, argv, "a::b:d:f::i:l:D:p:St::", data/rt-tests-1.5/src/svsematest/svsematest.c:407:11: [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. myfile = getenv("_"); data/rt-tests-1.5/src/backfire/sendme.c:63: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 filename[128]; data/rt-tests-1.5/src/backfire/sendme.c:74: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(filename, fileprefix, len_prefix); data/rt-tests-1.5/src/backfire/sendme.c:75: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(filename + len_prefix, name, len_name + 1); data/rt-tests-1.5/src/backfire/sendme.c:77:9: [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). path = open(filename, mode); data/rt-tests-1.5/src/backfire/sendme.c:149:16: [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). affinity = atoi(optarg); data/rt-tests-1.5/src/backfire/sendme.c:151:32: [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). } else if (optind < argc && atoi(argv[optind])) { data/rt-tests-1.5/src/backfire/sendme.c:152:16: [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). affinity = atoi(argv[optind]); data/rt-tests-1.5/src/backfire/sendme.c:157:26: [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). case 'b': tracelimit = atoi(optarg); break; data/rt-tests-1.5/src/backfire/sendme.c:158:24: [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). case 'i': interval = atoi(optarg); break; data/rt-tests-1.5/src/backfire/sendme.c:159:26: [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). case 'l': max_cycles = atoi(optarg); break; data/rt-tests-1.5/src/backfire/sendme.c:160:24: [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). case 'p': priority = atoi(optarg); break; data/rt-tests-1.5/src/backfire/sendme.c:217:9: [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). path = open("/dev/backfire", O_RDWR); data/rt-tests-1.5/src/backfire/sendme.c:236:3: [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 sigtest[8]; data/rt-tests-1.5/src/backfire/sendme.c:237:3: [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 timestamp[32]; data/rt-tests-1.5/src/backfire/sendme.c:247:3: [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(sigtest, "%d", SIGTEST); data/rt-tests-1.5/src/cyclictest/cyclictest.c:226:8: [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. static char fifopath[MAX_PATH]; data/rt-tests-1.5/src/cyclictest/cyclictest.c:227:8: [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. static char histfile[MAX_PATH]; data/rt-tests-1.5/src/cyclictest/cyclictest.c:265:22: [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). latency_target_fd = open("/dev/cpu_dma_latency", O_RDWR); data/rt-tests-1.5/src/cyclictest/cyclictest.c:331:8: [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[MAX_PATH]; data/rt-tests-1.5/src/cyclictest/cyclictest.c:337:17: [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. static __thread char tracebuf[TRACEBUFSIZ]; data/rt-tests-1.5/src/cyclictest/cyclictest.c:363: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[MAX_PATH]; data/rt-tests-1.5/src/cyclictest/cyclictest.c:370:18: [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). tracemark_fd = open(path, O_WRONLY); data/rt-tests-1.5/src/cyclictest/cyclictest.c:384:19: [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 ((trace_fd = open(path, O_WRONLY)) < 0) data/rt-tests-1.5/src/cyclictest/cyclictest.c:484: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 pathname[32]; data/rt-tests-1.5/src/cyclictest/cyclictest.c:487: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(pathname, "/dev/cpu/%d/msr", cpu); data/rt-tests-1.5/src/cyclictest/cyclictest.c:488:7: [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). fd = open(pathname, O_RDONLY); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1192:30: [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). } else if (optind<argc && atoi(argv[optind])) { data/rt-tests-1.5/src/cyclictest/cyclictest.c:1203:14: [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). offset = atoi(optarg) * 1000; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1204:28: [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). else if (optind<argc && atoi(argv[optind])) data/rt-tests-1.5/src/cyclictest/cyclictest.c:1205:14: [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). offset = atoi(argv[optind]) * 1000; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1211:17: [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). tracelimit = atoi(optarg); break; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1214:15: [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). clocksel = atoi(optarg); break; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1218:15: [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). distance = atoi(optarg); break; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1233:16: [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). histogram = atoi(optarg); break; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1240:15: [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). interval = atoi(optarg); break; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1243:17: [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). max_cycles = atoi(optarg); break; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1255:23: [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). oscope_reduction = atoi(optarg); break; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1258:15: [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). priority = atoi(optarg); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1274:14: [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). offset = atoi(optarg) * 1000; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1275:30: [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). else if (optind < argc && atoi(argv[optind])) data/rt-tests-1.5/src/cyclictest/cyclictest.c:1276:14: [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). offset = atoi(argv[optind]) * 1000; data/rt-tests-1.5/src/cyclictest/cyclictest.c:1298:19: [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). num_threads = atoi(optarg); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1299:28: [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). else if (optind<argc && atoi(argv[optind])) data/rt-tests-1.5/src/cyclictest/cyclictest.c:1300:19: [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). num_threads = atoi(argv[optind]); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1305:14: [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). trigger = atoi(optarg); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1309:25: [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). trigger_list_size = atoi(optarg); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1329:27: [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). latency_target_value = atoi(optarg); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1486:8: [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). fd = fopen(histfile, "w"); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1646:8: [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). fd = open(fifopath, O_WRONLY|O_NONBLOCK); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1999:3: [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 lavg[256]; data/rt-tests-1.5/src/cyclictest/cyclictest.c:2016:9: [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). fd = open("/proc/loadavg", O_RDONLY, 0666); data/rt-tests-1.5/src/cyclictest/rt_numa.h:126:11: [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. unsigned char cpumask[256]; data/rt-tests-1.5/src/cyclictest/rt_numa.h:165:8: [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). cpu = atoi(s); data/rt-tests-1.5/src/cyclictest/rt_numa.h:224:8: [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). cpu = atoi(s); data/rt-tests-1.5/src/hackbench/hackbench.c:134: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 data[datasize]; data/rt-tests-1.5/src/hackbench/hackbench.c:174:3: [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 data[datasize]; data/rt-tests-1.5/src/hackbench/hackbench.c:375:38: [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). if (!(argv[optind] && (datasize = atoi(optarg)) > 0)) { data/rt-tests-1.5/src/hackbench/hackbench.c:382:35: [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). if (!(argv[optind] && (loops = atoi(optarg)) > 0)) { data/rt-tests-1.5/src/hackbench/hackbench.c:389:40: [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). if (!(argv[optind] && (num_groups = atoi(optarg)) > 0)) { data/rt-tests-1.5/src/hackbench/hackbench.c:396:37: [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). if (!(argv[optind] && (num_fds = atoi(optarg)) > 0)) { data/rt-tests-1.5/src/lib/rt-utils.c:26:8: [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. static char debugfileprefix[MAX_PATH]; data/rt-tests-1.5/src/lib/rt-utils.c:33: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 type[100]; data/rt-tests-1.5/src/lib/rt-utils.c:44:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(debugfileprefix, "/sys/kernel/debug/tracing/"); data/rt-tests-1.5/src/lib/rt-utils.c:50:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(debugfileprefix, "/debug/tracing/"); data/rt-tests-1.5/src/lib/rt-utils.c:55:12: [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). if ((fp = fopen("/proc/mounts", "r")) == NULL) data/rt-tests-1.5/src/lib/rt-utils.c:90: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 cmd[MAX_PATH]; data/rt-tests-1.5/src/lib/rt-utils.c:126: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[CHUNKSZ]; data/rt-tests-1.5/src/lib/rt-utils.c:140:12: [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). if ((fp = fopen(buffer, "r")) == NULL) data/rt-tests-1.5/src/lib/rt-utils.c:208: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[MAX_PATH]; data/rt-tests-1.5/src/lib/rt-utils.c:213:12: [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 ((fd = open(buffer, O_WRONLY)) < 0) { data/rt-tests-1.5/src/lib/rt-utils.c:238: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[MAX_PATH]; data/rt-tests-1.5/src/lib/rt-utils.c:246: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[MAX_PATH]; data/rt-tests-1.5/src/pi_tests/pi_stress.c:1307: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(&low_sa, &sa, sizeof(struct sched_attr)); data/rt-tests-1.5/src/pi_tests/pi_stress.c:1310: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(&med_sa, &sa, sizeof(struct sched_attr)); data/rt-tests-1.5/src/pi_tests/pi_stress.c:1313: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(&high_sa, &sa, sizeof(struct sched_attr)); data/rt-tests-1.5/src/pmqtest/pmqtest.c:82: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 recvsyncmsg[MSG_SIZE]; data/rt-tests-1.5/src/pmqtest/pmqtest.c:83: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 recvtestmsg[MSG_SIZE]; data/rt-tests-1.5/src/pmqtest/pmqtest.c:85: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 error[MAX_PATH * 2]; data/rt-tests-1.5/src/pmqtest/pmqtest.c:204: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 tracing_enabled_file[MAX_PATH]; data/rt-tests-1.5/src/pmqtest/pmqtest.c:207:5: [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(tracing_enabled_file, "tracing_on"); data/rt-tests-1.5/src/pmqtest/pmqtest.c:209:9: [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). open(tracing_enabled_file, O_WRONLY); data/rt-tests-1.5/src/pmqtest/pmqtest.c:316:16: [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). affinity = atoi(optarg); data/rt-tests-1.5/src/pmqtest/pmqtest.c:318:30: [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). } else if (optind<argc && atoi(argv[optind])) { data/rt-tests-1.5/src/pmqtest/pmqtest.c:319:16: [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). affinity = atoi(argv[optind]); data/rt-tests-1.5/src/pmqtest/pmqtest.c:325:26: [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). case 'b': tracelimit = atoi(optarg); break; data/rt-tests-1.5/src/pmqtest/pmqtest.c:326:24: [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). case 'd': distance = atoi(optarg); break; data/rt-tests-1.5/src/pmqtest/pmqtest.c:327:28: [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). case 'f': forcetimeout = atoi(optarg); break; data/rt-tests-1.5/src/pmqtest/pmqtest.c:328:24: [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). case 'i': interval = atoi(optarg); break; data/rt-tests-1.5/src/pmqtest/pmqtest.c:329:26: [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). case 'l': max_cycles = atoi(optarg); break; data/rt-tests-1.5/src/pmqtest/pmqtest.c:331:24: [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). case 'p': priority = atoi(optarg); break; data/rt-tests-1.5/src/pmqtest/pmqtest.c:343:19: [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). num_threads = atoi(optarg); data/rt-tests-1.5/src/pmqtest/pmqtest.c:344:28: [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). else if (optind<argc && atoi(argv[optind])) data/rt-tests-1.5/src/pmqtest/pmqtest.c:345:19: [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). num_threads = atoi(argv[optind]); data/rt-tests-1.5/src/pmqtest/pmqtest.c:349:23: [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). case 'T': timeout = atoi(optarg); break; data/rt-tests-1.5/src/pmqtest/pmqtest.c:443:3: [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 mqname[16]; data/rt-tests-1.5/src/pmqtest/pmqtest.c:482: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(&sender[i], &receiver[i], sizeof(receiver[0])); data/rt-tests-1.5/src/pmqtest/pmqtest.c:570:3: [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 mqname[16]; data/rt-tests-1.5/src/ptsematest/ptsematest.c:72: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 error[MAX_PATH * 2]; data/rt-tests-1.5/src/ptsematest/ptsematest.c:131: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 tracing_enabled_file[MAX_PATH]; data/rt-tests-1.5/src/ptsematest/ptsematest.c:134:5: [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(tracing_enabled_file, "tracing_on"); data/rt-tests-1.5/src/ptsematest/ptsematest.c:136:9: [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). open(tracing_enabled_file, O_WRONLY); data/rt-tests-1.5/src/ptsematest/ptsematest.c:231:16: [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). affinity = atoi(optarg); data/rt-tests-1.5/src/ptsematest/ptsematest.c:233:30: [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). } else if (optind<argc && atoi(argv[optind])) { data/rt-tests-1.5/src/ptsematest/ptsematest.c:234:16: [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). affinity = atoi(argv[optind]); data/rt-tests-1.5/src/ptsematest/ptsematest.c:240:26: [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). case 'b': tracelimit = atoi(optarg); break; data/rt-tests-1.5/src/ptsematest/ptsematest.c:241:24: [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). case 'd': distance = atoi(optarg); break; data/rt-tests-1.5/src/ptsematest/ptsematest.c:242:24: [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). case 'i': interval = atoi(optarg); break; data/rt-tests-1.5/src/ptsematest/ptsematest.c:243:26: [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). case 'l': max_cycles = atoi(optarg); break; data/rt-tests-1.5/src/ptsematest/ptsematest.c:245:24: [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). case 'p': priority = atoi(optarg); break; data/rt-tests-1.5/src/ptsematest/ptsematest.c:257:19: [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). num_threads = atoi(optarg); data/rt-tests-1.5/src/ptsematest/ptsematest.c:258:28: [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). else if (optind<argc && atoi(argv[optind])) data/rt-tests-1.5/src/ptsematest/ptsematest.c:259:19: [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). num_threads = atoi(argv[optind]); data/rt-tests-1.5/src/ptsematest/ptsematest.c:371: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(&sender[i], &receiver[i], sizeof(receiver[0])); data/rt-tests-1.5/src/queuelat/queuelat.c:327:7: [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). fd = open("/sys/kernel/debug/tracing/trace_marker", O_RDWR); data/rt-tests-1.5/src/queuelat/queuelat.c:466:3: [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[500]; data/rt-tests-1.5/src/queuelat/queuelat.c:494:9: [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. ret = sprintf(buf, "memmove block queue_size=%d queue_dec=%d" data/rt-tests-1.5/src/queuelat/queuelat.c:504:10: [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. ret = sprintf(buf, "queue length exceeded: " data/rt-tests-1.5/src/queuelat/queuelat.c:631:15: [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). maxlatency = atoi(mvalue); data/rt-tests-1.5/src/queuelat/queuelat.c:632:29: [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). cycles_per_packet = atoi(cvalue); data/rt-tests-1.5/src/queuelat/queuelat.c:638:16: [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). alarm_secs = atoi(tvalue); data/rt-tests-1.5/src/queuelat/queuelat.c:643:29: [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). min_queue_size_to_print = atoi(qvalue); data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:50:17: [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. static __thread char buff[BUFSIZ+1]; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:71:12: [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). mark_fd = open(files[i], O_WRONLY); data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:126:8: [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. static char buffer[BUFSIZ]; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:214:26: [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). case 'p': prio_start = atoi(optarg); break; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:216:19: [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). run_interval = atoi(optarg); data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:218:24: [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). case 's': interval = atoi(optarg); break; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:219:23: [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). case 'l': nr_runs = atoi(optarg); break; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:221:33: [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). case 'm': max_err = usec2nano(atoi(optarg)); break; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:438: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[1024]; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:449:7: [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). fp = fopen("/proc/cpuinfo", "r"); data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:485:14: [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). nr_tasks = atoi(argv[optind]); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:86: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[BUFSIZ+1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:103: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 type[100]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:106:12: [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). if ((fp = fopen("/proc/mounts","r")) == NULL) data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:126:9: [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. static char debugfs[MAXPATH+1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:142: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 tmp[100]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:241: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 files[strlen(debugfs) + strlen("/tracing/trace_marker") + 1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:254:12: [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). mark_fd = open(files, O_WRONLY); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:260: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 files[strlen(debugfs) + strlen("/sched_features") + 1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:261: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[500]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:282:7: [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). fd = open(files, O_RDWR); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:333: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[MAXPATH]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:345:7: [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). fd = open(buf, O_WRONLY); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:408: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[MAXPATH]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:409: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[100]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:494:4: [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, "%d ", pids[i]); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:512:13: [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). if ((fp = fopen(path,"r")) == NULL) { data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:518:4: [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, "%d", pid); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:541: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[MAXPATH]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:542: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[100]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:559:12: [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). if ((fp = fopen(path,"r")) == NULL) { data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:567:7: [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). fd = open(path, O_WRONLY); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:576:3: [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, "%d", pid); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:911:9: [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). cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:921: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). cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:944:9: [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). cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:952:14: [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). end_cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:1040:15: [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). interval = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:1043:11: [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). step = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:1046:17: [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). nr_threads = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:1081:3: [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(setcpu_buf, "%d", cpu_count - 1); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:166: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[BUFSIZ+1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:169: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 padding[256]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:198: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 type[100]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:201:12: [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). if ((fp = fopen("/proc/mounts","r")) == NULL) data/rt-tests-1.5/src/sched_deadline/deadline_test.c:227:9: [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. static char debugfs[MAXPATH+1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:257: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 tmp[100]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:368: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 files[strlen(debugfs) + strlen("/tracing/trace_marker") + 1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:381:12: [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). mark_fd = open(files, O_WRONLY); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:398: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 files[strlen(debugfs) + strlen("/sched_features") + 1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:399: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[500]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:420:7: [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). fd = open(files, O_RDWR); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:492: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[MAXPATH]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:504:7: [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). fd = open(buf, O_WRONLY); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:608: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[MAXPATH]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:609: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[100]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:700:4: [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, "%d ", pids[i]); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:721:13: [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). if ((fp = fopen(path,"r")) == NULL) { data/rt-tests-1.5/src/sched_deadline/deadline_test.c:727:4: [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, "%d", pid); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:759: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[MAXPATH]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:760: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[100]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:784:12: [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). if ((fp = fopen(path,"r")) == NULL) { data/rt-tests-1.5/src/sched_deadline/deadline_test.c:793:7: [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). fd = open(path, O_WRONLY); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:808:3: [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, "%d", pid); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1008:9: [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). return atoi(p); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1042: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 file[1024]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1043: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[1024]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1053:7: [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). fp = fopen(file, "r"); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1056:8: [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). fp = fopen(file, "r"); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1526:9: [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). cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1536: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). cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1570:9: [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). cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1578:14: [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). end_cpu = atoi(p); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1748:15: [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). interval = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1751:14: [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). percent = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1754:18: [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). run_percent = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1757:11: [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). step = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1760:17: [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). nr_threads = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1763:14: [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). rt_task = atoi(optarg); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1803:3: [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(setcpu_buf, "%d", cpu_count - 1); data/rt-tests-1.5/src/signaltest/signaltest.c:252:26: [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). case 'b': tracelimit = atoi(optarg); break; data/rt-tests-1.5/src/signaltest/signaltest.c:253:26: [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). case 'l': max_cycles = atoi(optarg); break; data/rt-tests-1.5/src/signaltest/signaltest.c:255:24: [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). case 'p': priority = atoi(optarg); break; data/rt-tests-1.5/src/signaltest/signaltest.c:257:27: [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). case 't': num_threads = atoi(optarg); break; data/rt-tests-1.5/src/signaltest/signaltest.c:280: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 ver[256]; data/rt-tests-1.5/src/signaltest/signaltest.c:283:7: [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). fd = open("/proc/version", O_RDONLY, 0666); data/rt-tests-1.5/src/signaltest/signaltest.c:406:3: [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 lavg[256]; data/rt-tests-1.5/src/signaltest/signaltest.c:410:9: [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). fd = open("/proc/loadavg", O_RDONLY, 0666); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:72: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 error[MAX_PATH * 2]; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:179: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 tracing_enabled_file[MAX_PATH]; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:182:5: [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(tracing_enabled_file, "tracing_on"); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:184:9: [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). open(tracing_enabled_file, O_WRONLY); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:272:16: [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). affinity = atoi(optarg); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:274:30: [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). } else if (optind<argc && atoi(argv[optind])) { data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:275:16: [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). affinity = atoi(argv[optind]); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:281:30: [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). case 'b': thistracelimit = atoi(optarg); break; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:282:24: [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). case 'd': distance = atoi(optarg); break; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:290:26: [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). wasforked_threadno = atoi(optarg+1); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:294:24: [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). case 'i': interval = atoi(optarg); break; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:295:26: [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). case 'l': max_cycles = atoi(optarg); break; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:297:24: [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). case 'p': priority = atoi(optarg); break; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:300:19: [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). num_threads = atoi(optarg); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:301:28: [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). else if (optind<argc && atoi(argv[optind])) data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:302:19: [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). num_threads = atoi(argv[optind]); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:355: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 f_opt[8]; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:490: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 *args[3]; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:494:5: [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(f_opt, "-fr%d", i); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:509: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(&sender[i], &receiver[i], sizeof(receiver[0])); data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:518: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 *args[3]; data/rt-tests-1.5/src/sigwaittest/sigwaittest.c:522:5: [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(f_opt, "-fs%d", i); data/rt-tests-1.5/src/ssdd/ssdd.c:281:12: [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). nforks = atoi(*argv); data/rt-tests-1.5/src/ssdd/ssdd.c:284:13: [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). nsteps = atoi(*argv); data/rt-tests-1.5/src/svsematest/svsematest.c:82: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 error[MAX_PATH * 2]; data/rt-tests-1.5/src/svsematest/svsematest.c:185: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 tracing_enabled_file[MAX_PATH]; data/rt-tests-1.5/src/svsematest/svsematest.c:188:5: [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(tracing_enabled_file, "tracing_on"); data/rt-tests-1.5/src/svsematest/svsematest.c:190:9: [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). open(tracing_enabled_file, O_WRONLY); data/rt-tests-1.5/src/svsematest/svsematest.c:307:16: [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). affinity = atoi(optarg); data/rt-tests-1.5/src/svsematest/svsematest.c:309:30: [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). } else if (optind<argc && atoi(argv[optind])) { data/rt-tests-1.5/src/svsematest/svsematest.c:310:16: [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). affinity = atoi(argv[optind]); data/rt-tests-1.5/src/svsematest/svsematest.c:316:30: [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). case 'b': thistracelimit = atoi(optarg); break; data/rt-tests-1.5/src/svsematest/svsematest.c:317:24: [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). case 'd': distance = atoi(optarg); break; data/rt-tests-1.5/src/svsematest/svsematest.c:325:26: [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). wasforked_threadno = atoi(optarg+1); data/rt-tests-1.5/src/svsematest/svsematest.c:329:24: [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). case 'i': interval = atoi(optarg); break; data/rt-tests-1.5/src/svsematest/svsematest.c:330:26: [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). case 'l': max_cycles = atoi(optarg); break; data/rt-tests-1.5/src/svsematest/svsematest.c:332:24: [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). case 'p': priority = atoi(optarg); break; data/rt-tests-1.5/src/svsematest/svsematest.c:344:19: [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). num_threads = atoi(optarg); data/rt-tests-1.5/src/svsematest/svsematest.c:345:28: [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). else if (optind<argc && atoi(argv[optind])) data/rt-tests-1.5/src/svsematest/svsematest.c:346:19: [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). num_threads = atoi(argv[optind]); data/rt-tests-1.5/src/svsematest/svsematest.c:404: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 f_opt[8]; data/rt-tests-1.5/src/svsematest/svsematest.c:574: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 *args[3]; data/rt-tests-1.5/src/svsematest/svsematest.c:578:5: [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(f_opt, "-fr%d", i); data/rt-tests-1.5/src/svsematest/svsematest.c:593: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(&sender[i], &receiver[i], sizeof(receiver[0])); data/rt-tests-1.5/src/svsematest/svsematest.c:602: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 *args[3]; data/rt-tests-1.5/src/svsematest/svsematest.c:606:5: [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(f_opt, "-fs%d", i); data/rt-tests-1.5/src/backfire/backfire.c:70:9: [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). return strlen(buf); data/rt-tests-1.5/src/backfire/sendme.c:67: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). size_t len_prefix = strlen(fileprefix), len_name = strlen(name); data/rt-tests-1.5/src/backfire/sendme.c:67:53: [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). size_t len_prefix = strlen(fileprefix), len_name = strlen(name); data/rt-tests-1.5/src/backfire/sendme.c:81:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((got = read(path, value, sizeofvalue)) > 0) { data/rt-tests-1.5/src/backfire/sendme.c:259: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). write(path, sigtest, strlen(sigtest)); data/rt-tests-1.5/src/backfire/sendme.c:261:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(path, timestamp, sizeof(timestamp)); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1226:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fifopath, optarg, strnlen(optarg, MAX_PATH-1)); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1236:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(histfile, optarg, strnlen(optarg, MAX_PATH-1)); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1648:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rt-tests-1.5/src/cyclictest/cyclictest.c:1655:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(250); data/rt-tests-1.5/src/cyclictest/cyclictest.c:2017:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, &lavg, 255); data/rt-tests-1.5/src/cyclictest/cyclictest.c:2031:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rt-tests-1.5/src/cyclictest/cyclictest.c:2049:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/rt-tests-1.5/src/hackbench/hackbench.c:178:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(ctx->in_fds[0], data + done, datasize - done); data/rt-tests-1.5/src/hackbench/hackbench.c:483:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(readyfds[0], &dummy, 1) != 1) { data/rt-tests-1.5/src/lib/rt-utils.c:58:9: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (fscanf(fp, "%*s %" data/rt-tests-1.5/src/lib/rt-utils.c:80: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). size = sizeof(debugfileprefix) - strlen(debugfileprefix); data/rt-tests-1.5/src/lib/rt-utils.c:81:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(debugfileprefix, "/tracing/", size); data/rt-tests-1.5/src/lib/rt-utils.c:96: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(prefix) != 0) { data/rt-tests-1.5/src/lib/rt-utils.c:156:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ptr, buffer, ret); data/rt-tests-1.5/src/lib/rt-utils.c:197: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). if (strncmp(list[i], tracername, strlen(list[i])) == 0) data/rt-tests-1.5/src/lib/rt-utils.c:217: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). if ((ret = write(fd, val, strlen(val))) < 0) { data/rt-tests-1.5/src/pi_tests/pi_stress.c:340:3: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/rt-tests-1.5/src/pi_tests/pip_stress.c:176:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(usleep_val); data/rt-tests-1.5/src/pmqtest/pmqtest.c:126: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 (mq_send(par->testmq, testmsg, strlen(testmsg), 1) != 0) { data/rt-tests-1.5/src/pmqtest/pmqtest.c:141: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). != strlen(syncmsg)) { data/rt-tests-1.5/src/pmqtest/pmqtest.c:147: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(syncmsg)) { data/rt-tests-1.5/src/pmqtest/pmqtest.c:164: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). MSG_SIZE, NULL, &ts) != strlen(testmsg)) { data/rt-tests-1.5/src/pmqtest/pmqtest.c:181:9: [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(testmsg)) { data/rt-tests-1.5/src/pmqtest/pmqtest.c:228: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 (mq_send(par->syncmq, syncmsg, strlen(syncmsg), 1) != 0) { data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:111:12: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. static int equal; data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:169: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). char *p = arg+strlen(arg); data/rt-tests-1.5/src/rt-migrate-test/rt-migrate-test.c:262:13: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. int prio = equal && id && (id < nr_tasks - 1) ? 1 : id; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:109:9: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (fscanf(fp, "%*s %" data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:164:9: [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). l = strlen(str); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:165:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, str, end - s); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:189:9: [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). l = strlen(tmp); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:241: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). char files[strlen(debugfs) + strlen("/tracing/trace_marker") + 1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:241: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). char files[strlen(debugfs) + strlen("/tracing/trace_marker") + 1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:244: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(debugfs) == 0) data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:260: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). char files[strlen(debugfs) + strlen("/sched_features") + 1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:260: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). char files[strlen(debugfs) + strlen("/sched_features") + 1]; data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:274: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(debugfs) == 0) data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:289:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, len); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:432: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). ret = write(fd, cpus, strlen(cpus)); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.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). ret = write(fd, mems, strlen(mems)); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:495: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). ret = write(fd, buf, strlen(buf)); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:519: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). ret = write(fd, buf, strlen(buf)); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:579: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). write(fd, buf, strlen(buf)); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:628: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). char *p = arg+strlen(arg); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:994:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rt-tests-1.5/src/sched_deadline/cyclicdeadline.c:997:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:67: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). char *p = arg+strlen(arg); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:204:9: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (fscanf(fp, "%*s %" data/rt-tests-1.5/src/sched_deadline/deadline_test.c:279:9: [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). l = strlen(str); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:280:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, str, end - s); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:304:9: [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). l = strlen(tmp); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:368: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). char files[strlen(debugfs) + strlen("/tracing/trace_marker") + 1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:368: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). char files[strlen(debugfs) + strlen("/tracing/trace_marker") + 1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:371: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(debugfs) == 0) data/rt-tests-1.5/src/sched_deadline/deadline_test.c:398: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). char files[strlen(debugfs) + strlen("/sched_features") + 1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:398: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). char files[strlen(debugfs) + strlen("/sched_features") + 1]; data/rt-tests-1.5/src/sched_deadline/deadline_test.c:412: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(debugfs) == 0) data/rt-tests-1.5/src/sched_deadline/deadline_test.c:428:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, len); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:634: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). ret = write(fd, cpus, strlen(cpus)); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:644: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). ret = write(fd, mems, strlen(mems)); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:701: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). ret = write(fd, buf, strlen(buf)); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:728: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). ret = write(fd, buf, strlen(buf)); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:811: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). write(fd, buf, strlen(buf)); data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1016: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). if (strncmp(line, name, strlen(name)) == 0) { data/rt-tests-1.5/src/sched_deadline/deadline_test.c:1017: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). ret = get_value(line + strlen(name)); data/rt-tests-1.5/src/signaltest/signaltest.c:150:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rt-tests-1.5/src/signaltest/signaltest.c:284:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, ver, 255); data/rt-tests-1.5/src/signaltest/signaltest.c:411:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, &lavg, 255); data/rt-tests-1.5/src/signaltest/signaltest.c:421:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rt-tests-1.5/src/signaltest/signaltest.c:430:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/rt-tests-1.5/src/ssdd/ssdd.c:118:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); /* 10 msecs */ data/rt-tests-1.5/src/ssdd/ssdd.c:120:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); /* 20 + 10 = 30 msecs */ data/rt-tests-1.5/src/ssdd/ssdd.c:122:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(4000); /* 40 + 30 = 70 msecs */ data/rt-tests-1.5/src/ssdd/ssdd.c:124:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(8000); /* 80 + 70 = 150 msecs */ data/rt-tests-1.5/src/ssdd/ssdd.c:126:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(16000); /* 160 + 150 = 310 msecs */ ANALYSIS SUMMARY: Hits = 405 Lines analyzed = 15140 in approximately 0.41 seconds (36743 lines/second) Physical Source Lines of Code (SLOC) = 11510 Hits@level = [0] 420 [1] 81 [2] 255 [3] 15 [4] 52 [5] 2 Hits@level+ = [0+] 825 [1+] 405 [2+] 324 [3+] 69 [4+] 54 [5+] 2 Hits/KSLOC@level+ = [0+] 71.6768 [1+] 35.1868 [2+] 28.1494 [3+] 5.99479 [4+] 4.69157 [5+] 0.173762 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.