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/systemd-bootchart-233/src/_sd-common.h
Examining data/systemd-bootchart-233/src/alloc-util.c
Examining data/systemd-bootchart-233/src/alloc-util.h
Examining data/systemd-bootchart-233/src/architecture.h
Examining data/systemd-bootchart-233/src/attributes.h
Examining data/systemd-bootchart-233/src/bootchart.c
Examining data/systemd-bootchart-233/src/bootchart.h
Examining data/systemd-bootchart-233/src/build.h
Examining data/systemd-bootchart-233/src/cgroup-util.c
Examining data/systemd-bootchart-233/src/cgroup-util.h
Examining data/systemd-bootchart-233/src/conf-files.c
Examining data/systemd-bootchart-233/src/conf-files.h
Examining data/systemd-bootchart-233/src/conf-parser.c
Examining data/systemd-bootchart-233/src/conf-parser.h
Examining data/systemd-bootchart-233/src/def.h
Examining data/systemd-bootchart-233/src/dirent-util.c
Examining data/systemd-bootchart-233/src/dirent-util.h
Examining data/systemd-bootchart-233/src/fd-util.c
Examining data/systemd-bootchart-233/src/fd-util.h
Examining data/systemd-bootchart-233/src/fileio.c
Examining data/systemd-bootchart-233/src/fileio.h
Examining data/systemd-bootchart-233/src/formats-util.h
Examining data/systemd-bootchart-233/src/fs-util.c
Examining data/systemd-bootchart-233/src/fs-util.h
Examining data/systemd-bootchart-233/src/hash-funcs.c
Examining data/systemd-bootchart-233/src/hash-funcs.h
Examining data/systemd-bootchart-233/src/hashmap.c
Examining data/systemd-bootchart-233/src/hashmap.h
Examining data/systemd-bootchart-233/src/io-util.c
Examining data/systemd-bootchart-233/src/io-util.h
Examining data/systemd-bootchart-233/src/list.h
Examining data/systemd-bootchart-233/src/log.c
Examining data/systemd-bootchart-233/src/log.h
Examining data/systemd-bootchart-233/src/macro.h
Examining data/systemd-bootchart-233/src/mempool.c
Examining data/systemd-bootchart-233/src/mempool.h
Examining data/systemd-bootchart-233/src/missing.h
Examining data/systemd-bootchart-233/src/parse-util.c
Examining data/systemd-bootchart-233/src/parse-util.h
Examining data/systemd-bootchart-233/src/path-util.c
Examining data/systemd-bootchart-233/src/path-util.h
Examining data/systemd-bootchart-233/src/process-util.c
Examining data/systemd-bootchart-233/src/process-util.h
Examining data/systemd-bootchart-233/src/random-util.c
Examining data/systemd-bootchart-233/src/random-util.h
Examining data/systemd-bootchart-233/src/sd-messages.h
Examining data/systemd-bootchart-233/src/set.h
Examining data/systemd-bootchart-233/src/siphash24.c
Examining data/systemd-bootchart-233/src/siphash24.h
Examining data/systemd-bootchart-233/src/stdio-util.h
Examining data/systemd-bootchart-233/src/store.c
Examining data/systemd-bootchart-233/src/store.h
Examining data/systemd-bootchart-233/src/string-util.c
Examining data/systemd-bootchart-233/src/string-util.h
Examining data/systemd-bootchart-233/src/strv.c
Examining data/systemd-bootchart-233/src/strv.h
Examining data/systemd-bootchart-233/src/strxcpyx.c
Examining data/systemd-bootchart-233/src/strxcpyx.h
Examining data/systemd-bootchart-233/src/svg.c
Examining data/systemd-bootchart-233/src/svg.h
Examining data/systemd-bootchart-233/src/terminal-util.c
Examining data/systemd-bootchart-233/src/terminal-util.h
Examining data/systemd-bootchart-233/src/time-util.c
Examining data/systemd-bootchart-233/src/time-util.h
Examining data/systemd-bootchart-233/src/unaligned.h
Examining data/systemd-bootchart-233/src/utf8.c
Examining data/systemd-bootchart-233/src/utf8.h
Examining data/systemd-bootchart-233/src/util.c
Examining data/systemd-bootchart-233/src/util.h

FINAL RESULTS:

data/systemd-bootchart-233/src/_sd-common.h:31:54:  [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.
#    define _sd_printf_(a,b) __attribute__ ((format (printf, a, b)))
data/systemd-bootchart-233/src/attributes.h:1:47:  [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.
#define _printf_(a,b) __attribute__ ((format (printf, a, b)))
data/systemd-bootchart-233/src/bootchart.c:356:25:  [4] (shell) execl:
  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.
                        execl(arg_init_path, arg_init_path, NULL);
data/systemd-bootchart-233/src/bootchart.c:398:22:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        has_procfs = access("/proc/vmstat", F_OK) == 0;
data/systemd-bootchart-233/src/bootchart.c:428:38:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
                        has_procfs = access("/proc/vmstat", F_OK) == 0;
data/systemd-bootchart-233/src/log.c:178:9:  [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, sizeof(buffer), format, ap);
data/systemd-bootchart-233/src/log.c:270:17:  [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(buf, sizeof(buf), format, aq);
data/systemd-bootchart-233/src/log.c:320:9:  [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, sizeof(buffer), format, ap);
data/systemd-bootchart-233/src/path-util.h:51:50:  [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).
        for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); streq(prefix, "/") ? NULL : strrchr(prefix, '/'); }); _slash && ((*_slash = 0), true); _slash = strrchr((prefix), '/'))
data/systemd-bootchart-233/src/path-util.h:55:50:  [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).
        for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); if (streq(prefix, "/")) prefix[0] = 0; strrchr(prefix, 0); }); _slash && ((*_slash = 0), true); _slash = strrchr((prefix), '/'))
data/systemd-bootchart-233/src/path-util.h:76:25:  [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(_p, _path);                              \
data/systemd-bootchart-233/src/process-util.h:39:25:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                        sprintf((char*) _r_, "/proc/"PID_FMT"/" field, _pid_);                       \
data/systemd-bootchart-233/src/stdio-util.h:30:36:  [4] (format) snprintf:
  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.
        assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
data/systemd-bootchart-233/src/store.c:178:21:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                if (sscanf(m, "%s %s", key, val) < 2)
data/systemd-bootchart-233/src/store.c:199:21:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                if (sscanf(m, "%s %*s %*s %*s %*s %*s %*s %s %s", key, rt, wt) < 3)
data/systemd-bootchart-233/src/store.c:304:30:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                        if (!sscanf(buf, "%s %*s %*s", key))
data/systemd-bootchart-233/src/store.c:318:30:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                        if (!sscanf(m, "%*s %*s %s", t))
data/systemd-bootchart-233/src/store.c:410:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                if (!sscanf(buf, "%s %s %*s", rt, wt))
data/systemd-bootchart-233/src/store.c:437:17:  [4] (format) snprintf:
  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.
                snprintf(filename, sizeof(filename), PID_FMT "/task", pid);
data/systemd-bootchart-233/src/store.c:462:33:  [4] (format) snprintf:
  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.
                                snprintf(filename, sizeof(filename), PID_FMT "/schedstat", tid);
data/systemd-bootchart-233/src/store.c:473:38:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                                if (!sscanf(buf, "%s %s %*s", rt, wt))
data/systemd-bootchart-233/src/store.c:567:30:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                        if (!sscanf(buf, "%s %*s %*s", key))
data/systemd-bootchart-233/src/svg.c:939:13:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        f = popen("dmesg", "r");
data/systemd-bootchart-233/src/svg.c:958:21:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                c = sscanf(p, "[%lf] initcall %s %*s %d %*s %d %*s",
data/systemd-bootchart-233/src/svg.c:962:29:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                        c = sscanf(p, "[%lf] initcall %s %*s %*s %d %*s %d %*s",
data/systemd-bootchart-233/src/bootchart.c:186:21:  [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 ((c = getopt_long(argc, argv, "erpf:n:o:i:FCchx:y:", options, NULL)) >= 0)
data/systemd-bootchart-233/src/random-util.c:113:9:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        srand(x);
data/systemd-bootchart-233/src/alloc-util.c:34:9:  [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(r, p, l);
data/systemd-bootchart-233/src/bootchart.c:93:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char arg_init_path[PATH_MAX] = DEFAULT_INIT;
data/systemd-bootchart-233/src/bootchart.c:94:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char arg_output_path[PATH_MAX] = DEFAULT_OUTPUT;
data/systemd-bootchart-233/src/bootchart.c:289:9:  [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(p, "BOOTCHART=", 10);
data/systemd-bootchart-233/src/bootchart.c:291:14:  [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(file, O_RDONLY|O_CLOEXEC);
data/systemd-bootchart-233/src/bootchart.c:324: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.
        char output_file[PATH_MAX];
data/systemd-bootchart-233/src/bootchart.c:325: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.
        char datestr[200];
data/systemd-bootchart-233/src/bootchart.c:360:17:  [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).
        schfd = open("/proc/sys/kernel/sched_schedstats", O_WRONLY);
data/systemd-bootchart-233/src/bootchart.c:419:33:  [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).
                        sysfd = open("/sys", O_RDONLY|O_CLOEXEC);
data/systemd-bootchart-233/src/bootchart.c:489:22:  [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).
                of = fopen(output_file, "we");
data/systemd-bootchart-233/src/bootchart.h:72: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.
        char name[256];
data/systemd-bootchart-233/src/bootchart.h:118: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.
extern char arg_output_path[PATH_MAX];
data/systemd-bootchart-233/src/bootchart.h:119: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.
extern char arg_init_path[PATH_MAX];
data/systemd-bootchart-233/src/cgroup-util.c:42: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.
        char line[LINE_MAX];
data/systemd-bootchart-233/src/cgroup-util.c:64: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).
        f = fopen(fs, "re");
data/systemd-bootchart-233/src/conf-parser.c:258:28:  [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).
                f = ours = fopen(filename, "re");
data/systemd-bootchart-233/src/conf-parser.c:272: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.
                char l[LINE_MAX], *p, *c = NULL, *e;
data/systemd-bootchart-233/src/fileio.c:39: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.
        char t[LINE_MAX], *c;
data/systemd-bootchart-233/src/fileio.c:44: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).
        f = fopen(fn, "re");
data/systemd-bootchart-233/src/fileio.c:134: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).
        f = fopen(fn, "re");
data/systemd-bootchart-233/src/hashmap.c:196: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.
        char storage[sizeof(struct indirect_storage)];
data/systemd-bootchart-233/src/hashmap.c:345:9:  [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(hash_key, current, sizeof(current));
data/systemd-bootchart-233/src/hashmap.c:445:9:  [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(e_to, e_from, hashmap_type_info[h->type].entry_size);
data/systemd-bootchart-233/src/hashmap.c:1081:17:  [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(new_storage, h->direct.storage,
data/systemd-bootchart-233/src/log.c:166: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.
        char buffer[LINE_MAX];
data/systemd-bootchart-233/src/log.c:209:16:  [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[LINE_MAX];
data/systemd-bootchart-233/src/log.c:251: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.
        char buf[LINE_MAX];
data/systemd-bootchart-233/src/log.c:306: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.
        char buffer[LINE_MAX];
data/systemd-bootchart-233/src/macro.h:233: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.
                char x[(expr) ? 0 : -1];                                \
data/systemd-bootchart-233/src/macro.h:337:33:  [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 _unused_ char _static_assert__macros_need_to_be_extended[20 - sizeof((int[]){__VA_ARGS__})/sizeof(int)]; \
data/systemd-bootchart-233/src/path-util.c:272:9:  [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(mempcpy(ret, path, e + 1 - path), filename, k + 1);
data/systemd-bootchart-233/src/process-util.c:51: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).
        f = fopen(path, "re");
data/systemd-bootchart-233/src/process-util.c:62: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.
                char line[LINE_MAX];
data/systemd-bootchart-233/src/random-util.c:80:14:  [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("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
data/systemd-bootchart-233/src/store.c:53: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 smaps_buf[4096];
data/systemd-bootchart-233/src/store.c:78: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.
        char filename[PATH_MAX];
data/systemd-bootchart-233/src/store.c:82: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.
        sprintf(filename, "%d/cmdline", pid);
data/systemd-bootchart-233/src/store.c:133: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.
        char buf[4096];
data/systemd-bootchart-233/src/store.c:134: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.
        char key[256];
data/systemd-bootchart-233/src/store.c:135: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.
        char val[256];
data/systemd-bootchart-233/src/store.c:136: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.
        char rt[256];
data/systemd-bootchart-233/src/store.c:137: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.
        char wt[256];
data/systemd-bootchart-233/src/store.c:181:52:  [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).
                        sampledata->blockstat.bi = atoi(val);
data/systemd-bootchart-233/src/store.c:183:52:  [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).
                        sampledata->blockstat.bo = atoi(val);
data/systemd-bootchart-233/src/store.c:231:53:  [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).
                        sampledata->entropy_avail = atoi(buf);
data/systemd-bootchart-233/src/store.c:236: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.
                char filename[PATH_MAX];
data/systemd-bootchart-233/src/store.c:243: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).
                pid = atoi(ent->d_name);
data/systemd-bootchart-233/src/store.c:258:25:  [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 t[32];
data/systemd-bootchart-233/src/store.c:291:33:  [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(filename, "%d/sched", pid);
data/systemd-bootchart-233/src/store.c:338:25:  [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(filename, "%d/stat", pid);
data/systemd-bootchart-233/src/store.c:398:25:  [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(filename, "%d/schedstat", pid);
data/systemd-bootchart-233/src/store.c:492:25:  [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(filename, "%d/smaps", pid);
data/systemd-bootchart-233/src/store.c:534:34:  [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).
                        pss_kb = atoi(&buf[61]);
data/systemd-bootchart-233/src/store.c:555:33:  [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(filename, "%d/sched", pid);
data/systemd-bootchart-233/src/string-util.c:100: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.
                char quotechars[2] = {*current, '\0'};
data/systemd-bootchart-233/src/string-util.c:150:9:  [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(r, s, a);
data/systemd-bootchart-233/src/string-util.c:151:9:  [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(r+a, suffix, b);
data/systemd-bootchart-233/src/svg.c:49:14:  [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 const char * const colorwheel[12] = {
data/systemd-bootchart-233/src/svg.c:151: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.
        char date[256] = "Unknown";
data/systemd-bootchart-233/src/svg.c:168: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.
                char rootbdev[4];
data/systemd-bootchart-233/src/svg.c:169: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.
                char filename[32];
data/systemd-bootchart-233/src/svg.c:913: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.
        char func[256];
data/systemd-bootchart-233/src/svg.c:946: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.
                char l[256];
data/systemd-bootchart-233/src/terminal-util.c:52: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).
                fd = open(name, mode, 0);
data/systemd-bootchart-233/src/terminal-util.c:91:14:  [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("/dev/tty", O_RDWR|O_NOCTTY|O_CLOEXEC|O_NONBLOCK);
data/systemd-bootchart-233/src/utf8.c:68:22:  [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 const char table[16] = "0123456789abcdef";
data/systemd-bootchart-233/src/util.h:75:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, src, n);
data/systemd-bootchart-233/src/cgroup-util.c:60: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).
                cs = strlen(controller);
data/systemd-bootchart-233/src/conf-parser.c:175:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                k = strlen(l);
data/systemd-bootchart-233/src/fileio.c:532:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        t += strlen(pattern);
data/systemd-bootchart-233/src/hash-funcs.c:27: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).
        siphash24_compress(p, strlen(p) + 1, state);
data/systemd-bootchart-233/src/io-util.c:45:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                k = read(fd, p, nbytes);
data/systemd-bootchart-233/src/io-util.h:42: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).
                _i->iov_len = strlen(_s);       \
data/systemd-bootchart-233/src/path-util.c:267: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).
        k = strlen(filename);
data/systemd-bootchart-233/src/path-util.h:69:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        _l = strlen(_root) + 1 + strlen(_path) + 1;     \
data/systemd-bootchart-233/src/path-util.h:69:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        _l = strlen(_root) + 1 + strlen(_path) + 1;     \
data/systemd-bootchart-233/src/process-util.c:58: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).
        l = strlen(field);
data/systemd-bootchart-233/src/process-util.c:68:29:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        c = getc(f);
data/systemd-bootchart-233/src/process-util.h:38: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).
                        _r_ = alloca(strlen("/proc/") + DECIMAL_STR_MAX(pid_t) + 1 + sizeof(field)); \
data/systemd-bootchart-233/src/store.c:87:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = read(fd, buffer, buf_len-1);
data/systemd-bootchart-233/src/string-util.c:50:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        sl = strlen(s);
data/systemd-bootchart-233/src/string-util.c:51:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        pl = strlen(postfix);
data/systemd-bootchart-233/src/string-util.c:142: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).
        a = strlen(s);
data/systemd-bootchart-233/src/string-util.c:158:47:  [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 strnappend(s, suffix, suffix ? strlen(suffix) : 0);
data/systemd-bootchart-233/src/string-util.c:169:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                l = strlen(x);
data/systemd-bootchart-233/src/string-util.c:179:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        n = strlen(t);
data/systemd-bootchart-233/src/string-util.c:258:17:  [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 (l < strlen(s))
data/systemd-bootchart-233/src/string-util.c:280:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        isz = _isz ? *_isz : strlen(*ibuf);
data/systemd-bootchart-233/src/string-util.c:354: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).
        l = f = *x ? strlen(*x) : 0;
data/systemd-bootchart-233/src/string-util.c:365:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                n = strlen(t);
data/systemd-bootchart-233/src/string-util.c:406: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).
        l = strlen(s);
data/systemd-bootchart-233/src/string-util.h:72: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).
        l = strlen(prefix);
data/systemd-bootchart-233/src/string-util.h:82: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).
        l = strlen(prefix);
data/systemd-bootchart-233/src/string-util.h:117: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).
                        _len_ += strlen(_appendees_[_i_]);              \
data/systemd-bootchart-233/src/strv.c:297: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).
        k = strlen(separator);
data/systemd-bootchart-233/src/strv.c:303: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).
                n += strlen(*s);
data/systemd-bootchart-233/src/strxcpyx.c:33:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(src);
data/systemd-bootchart-233/src/svg.c:171:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(rootbdev, &c[10], sizeof(rootbdev) - 1);
data/systemd-bootchart-233/src/svg.c:1039:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (!utf8_is_printable(ps->name, strlen(ps->name)))
data/systemd-bootchart-233/src/terminal-util.c:63:17:  [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(50 * USEC_PER_MSEC);
data/systemd-bootchart-233/src/utf8.c:202: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).
        p = s = malloc(strlen(str) * 4 + 1);
data/systemd-bootchart-233/src/utf8.c:229: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).
        p = s = malloc(strlen(str) * 4 + 1);

ANALYSIS SUMMARY:

Hits = 129
Lines analyzed = 13241 in approximately 0.40 seconds (33319 lines/second)
Physical Source Lines of Code (SLOC) = 8742
Hits@level = [0] 166 [1]  35 [2]  67 [3]   2 [4]  25 [5]   0
Hits@level+ = [0+] 295 [1+] 129 [2+]  94 [3+]  27 [4+]  25 [5+]   0
Hits/KSLOC@level+ = [0+] 33.7451 [1+] 14.7563 [2+] 10.7527 [3+] 3.08854 [4+] 2.85976 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.