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/qps-2.0.0/src/checkboxdelegate.cpp
Examining data/qps-2.0.0/src/checkboxdelegate.h
Examining data/qps-2.0.0/src/command.cpp
Examining data/qps-2.0.0/src/command.h
Examining data/qps-2.0.0/src/commanddialog.cpp
Examining data/qps-2.0.0/src/commanddialog.h
Examining data/qps-2.0.0/src/commandmodel.cpp
Examining data/qps-2.0.0/src/commandmodel.h
Examining data/qps-2.0.0/src/commandutils.cpp
Examining data/qps-2.0.0/src/commandutils.h
Examining data/qps-2.0.0/src/config.h
Examining data/qps-2.0.0/src/details.cpp
Examining data/qps-2.0.0/src/details.h
Examining data/qps-2.0.0/src/dialogs.cpp
Examining data/qps-2.0.0/src/dialogs.h
Examining data/qps-2.0.0/src/execwindow.cpp
Examining data/qps-2.0.0/src/execwindow.h
Examining data/qps-2.0.0/src/fieldsel.cpp
Examining data/qps-2.0.0/src/fieldsel.h
Examining data/qps-2.0.0/src/global.h
Examining data/qps-2.0.0/src/htable.cpp
Examining data/qps-2.0.0/src/htable.h
Examining data/qps-2.0.0/src/infobar.cpp
Examining data/qps-2.0.0/src/infobar.h
Examining data/qps-2.0.0/src/listmodel.cpp
Examining data/qps-2.0.0/src/listmodel.h
Examining data/qps-2.0.0/src/lookup.cpp
Examining data/qps-2.0.0/src/lookup.h
Examining data/qps-2.0.0/src/misc.cpp
Examining data/qps-2.0.0/src/misc.h
Examining data/qps-2.0.0/src/prefs.cpp
Examining data/qps-2.0.0/src/prefs.h
Examining data/qps-2.0.0/src/proc.cpp
Parsing failed to find end of parameter list; semicolon terminated it in (p1,
           " %c %d %d %d %d %d"
           " %lu %lu %lu %lu %lu "
           "%ld %ld %ld %ld %d %d %d %*s %lu %*s %*s %*s %*s %*s %*s %*s %*s "
           "%*s %*s %*s %*s %lu %*s %*s %*s %u %*
Examining data/qps-2.0.0/src/proc.h
Examining data/qps-2.0.0/src/proc_common.cpp
Examining data/qps-2.0.0/src/proc_linux.cpp
Parsing failed to find end of parameter list; semicolon terminated it in (p1,
           " %c %d %d %d %d %d"
           " %lu %lu %lu %lu %lu "
           "%ld %ld %ld %ld %d %d %d %*s %lu %*s %*s %*s %*s %*s %*s %*s %*s "
           "%*s %*s %*s %*s %lu %*s %*s %*s %u %*
Examining data/qps-2.0.0/src/proc_mosix.cpp
Examining data/qps-2.0.0/src/proc_solaris.cpp
Examining data/qps-2.0.0/src/pstable.cpp
Examining data/qps-2.0.0/src/pstable.h
Examining data/qps-2.0.0/src/qps.cpp
Examining data/qps-2.0.0/src/qps.h
Examining data/qps-2.0.0/src/qpsapp.cpp
Examining data/qps-2.0.0/src/qpsapp.h
Examining data/qps-2.0.0/src/qttableview.cpp
Examining data/qps-2.0.0/src/qttableview.h
Examining data/qps-2.0.0/src/screenshot.cpp
Examining data/qps-2.0.0/src/screenshot.h
Examining data/qps-2.0.0/src/stable.h
Examining data/qps-2.0.0/src/svec.cpp
Examining data/qps-2.0.0/src/svec.h
Examining data/qps-2.0.0/src/tablefield.h
Examining data/qps-2.0.0/src/trayicon.cpp
Examining data/qps-2.0.0/src/trayicon.h
Examining data/qps-2.0.0/src/ttystr.cpp
Examining data/qps-2.0.0/src/ttystr.h
Examining data/qps-2.0.0/src/uidstr.cpp
Examining data/qps-2.0.0/src/uidstr.h
Examining data/qps-2.0.0/src/watchcond.cpp
Examining data/qps-2.0.0/src/watchcond.h
Examining data/qps-2.0.0/src/watchdogdialog.cpp
Examining data/qps-2.0.0/src/watchdogdialog.h
Examining data/qps-2.0.0/src/wchan.cpp
Examining data/qps-2.0.0/src/wchan.h

FINAL RESULTS:

data/qps-2.0.0/src/proc.cpp:158:18:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        if ((r = readlink(path, buffer_proc, sizeof(buffer_proc) - 1)) >= 0)
data/qps-2.0.0/src/proc.cpp:198:18:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        if ((r = readlink(path, buffer_proc, sizeof(buffer_proc) - 1)) >= 0)
data/qps-2.0.0/src/proc.cpp:263:15:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        len = readlink(path, fname, sizeof(fname) - 1);
data/qps-2.0.0/src/proc.cpp:1263:16:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    if ((len = readlink(path, buf, sizeof(buf) - 1)) > 0)
data/qps-2.0.0/src/proc.cpp:1628:17:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        int n = readlink(path, buf, sizeof(buf) - 1);
data/qps-2.0.0/src/proc_linux.cpp:158:18:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        if ((r = readlink(path, buffer_proc, sizeof(buffer_proc) - 1)) >= 0)
data/qps-2.0.0/src/proc_linux.cpp:198:18:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        if ((r = readlink(path, buffer_proc, sizeof(buffer_proc) - 1)) >= 0)
data/qps-2.0.0/src/proc_linux.cpp:266:15:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        len = readlink(path, fname, sizeof(fname) - 1);
data/qps-2.0.0/src/proc_linux.cpp:1257:16:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    if ((len = readlink(path, buf, sizeof(buf) - 1)) > 0)
data/qps-2.0.0/src/proc_linux.cpp:1630:17:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        int n = readlink(path, buf, sizeof(buf) - 1);
data/qps-2.0.0/src/proc_mosix.cpp:884:16:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    if ((len = readlink(path, buf, sizeof(buf) - 1)) > 0)
data/qps-2.0.0/src/proc_mosix.cpp:1642:17:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        int n = readlink(path, buf, sizeof(buf) - 1);
data/qps-2.0.0/src/command.cpp:190:15:  [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.
    int ret = system(s.toLatin1().data()); ///
data/qps-2.0.0/src/details.cpp:272:15:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            s.sprintf("(%d.%d.%d.%d)", (a >> 24) & 0xff, (a >> 16) & 0xff,
data/qps-2.0.0/src/details.cpp:281:15:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            s.sprintf("%d.%d.%d.%d", (a >> 24) & 0xff, (a >> 16) & 0xff,
data/qps-2.0.0/src/details.cpp:464:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(buf, (sizeof(void *) == 4) ? "%08lx-%08lx" : "%016lx-%016lx",
data/qps-2.0.0/src/details.cpp:478:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(buf, (sizeof(void *) == 4) ? "%08lx" : "%016lx", mi->offset);
data/qps-2.0.0/src/details.cpp:482:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%2u,%2u", mi->major, mi->minor);
data/qps-2.0.0/src/dialogs.cpp:152:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    txt.sprintf("%d ms", (int)period);
data/qps-2.0.0/src/infobar.cpp:185:16:  [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).
        name = strcat(buff, name);
data/qps-2.0.0/src/infobar.cpp:278:16:  [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).
        name = strcat(buff, name);
data/qps-2.0.0/src/infobar.cpp:365:23:  [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.
    long total, user, system, idle, nice, wait;
data/qps-2.0.0/src/infobar.cpp:399:63:  [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.
            width = drawSPECTRUM(p, 0, 0, "CPU", total, user, system, nice,
data/qps-2.0.0/src/infobar.cpp:455:58:  [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.
                                      buff, total, user, system, nice,
data/qps-2.0.0/src/infobar.cpp:461:58:  [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.
                                      buff, total, user, system, wait,
data/qps-2.0.0/src/infobar.cpp:480:27:  [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.
        f_system = (float)system / total * 100;
data/qps-2.0.0/src/infobar.cpp:522:9:  [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(str_buff, str);
data/qps-2.0.0/src/infobar.cpp:526:9:  [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(str_buff, str);
data/qps-2.0.0/src/infobar.cpp:531:9:  [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(str_buff, str);
data/qps-2.0.0/src/infobar.cpp:534:9:  [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(str_buff, str);
data/qps-2.0.0/src/infobar.cpp:563:9:  [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(str_buff, str);
data/qps-2.0.0/src/infobar.cpp:566:9:  [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(str_buff, str);
data/qps-2.0.0/src/infobar.cpp:569:9:  [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(str_buff, str);
data/qps-2.0.0/src/infobar.cpp:598:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buff, "UPTIME %dDAY%s,%d:%02d:%02d", up_days,
data/qps-2.0.0/src/infobar.cpp:925:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buf, "%s/s read", mem_str);
data/qps-2.0.0/src/infobar.cpp:932:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buf, " %s/s write", mem_str);
data/qps-2.0.0/src/misc.cpp:122: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.
                k += sscanf(s, "%s%n", va_arg(va, char *), &n);
data/qps-2.0.0/src/proc.cpp:147:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "/proc/%s", fname);
data/qps-2.0.0/src/proc.cpp:151:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/task/%d/%s", tgid, pid, fname);
data/qps-2.0.0/src/proc.cpp:153:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/%s", pid, fname);
data/qps-2.0.0/src/proc.cpp:194:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%s", r_path, fname);
data/qps-2.0.0/src/proc.cpp:261:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(path, e->d_name);
data/qps-2.0.0/src/proc.cpp:587:17:  [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(cmdline_cmd, buf);
data/qps-2.0.0/src/proc.cpp:1089:26:  [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.
    unsigned user, nice, system, idle, iowait, irq, sftirq, steal, guest, nflds;
data/qps-2.0.0/src/proc.cpp:1090:74:  [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.
    nflds = sscanf(buf, "cpu %u %u %u %u %u %u %u %u %u", &user, &nice, &system,
data/qps-2.0.0/src/proc.cpp:1105:49:  [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.
    cpu_times(Proc::num_cpus, CPUTIME_SYSTEM) = system;
data/qps-2.0.0/src/proc.cpp:1177: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(path, PROCDIR);
data/qps-2.0.0/src/proc.cpp:1283:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buf, "%s socket %lu",
data/qps-2.0.0/src/proc.cpp:1325:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(buf, "UNIX domain socket %lu (%s, %s) ", ino, tp,
data/qps-2.0.0/src/proc.cpp:1372:9:  [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(str, path);
data/qps-2.0.0/src/proc.cpp:1373:9:  [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(str, e->d_name);
data/qps-2.0.0/src/proc.cpp:1386:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "/proc/net/%s", filename);
data/qps-2.0.0/src/proc.cpp:1438: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(path, PROCDIR);
data/qps-2.0.0/src/proc.cpp:1624:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/task/%d/%s", p->pid, p->pid, dir);
data/qps-2.0.0/src/proc.cpp:1626:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/%s", p->pid, dir);
data/qps-2.0.0/src/proc.cpp:1742:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%.3f", p->tms);
data/qps-2.0.0/src/proc.cpp:1761:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%lx", p->affcpu);
data/qps-2.0.0/src/proc_common.cpp:63:9:  [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(buff, pw->pw_name);
data/qps-2.0.0/src/proc_common.cpp:66:9:  [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(buff, euid == 0 ? "*" : "+");
data/qps-2.0.0/src/proc_common.cpp:119:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%01.2f", (double)(p->*float_member));
data/qps-2.0.0/src/proc_common.cpp:186:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%8x", (unsigned)(p->*uintl_member));
data/qps-2.0.0/src/proc_linux.cpp:147:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "/proc/%s", fname);
data/qps-2.0.0/src/proc_linux.cpp:151:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/task/%d/%s", tgid, pid, fname);
data/qps-2.0.0/src/proc_linux.cpp:153:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/%s", pid, fname);
data/qps-2.0.0/src/proc_linux.cpp:194:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%s", r_path, fname);
data/qps-2.0.0/src/proc_linux.cpp:264:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(path, e->d_name);
data/qps-2.0.0/src/proc_linux.cpp:581:17:  [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(cmdline_cmd, buf);
data/qps-2.0.0/src/proc_linux.cpp:1084:26:  [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.
    unsigned user, nice, system, idle, iowait, irq, sftirq, steal, guest, nflds;
data/qps-2.0.0/src/proc_linux.cpp:1085:74:  [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.
    nflds = sscanf(buf, "cpu %u %u %u %u %u %u %u %u %u", &user, &nice, &system,
data/qps-2.0.0/src/proc_linux.cpp:1100:49:  [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.
    cpu_times(Proc::num_cpus, CPUTIME_SYSTEM) = system;
data/qps-2.0.0/src/proc_linux.cpp:1171: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(path, PROCDIR);
data/qps-2.0.0/src/proc_linux.cpp:1277:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buf, "%s socket %lu",
data/qps-2.0.0/src/proc_linux.cpp:1319:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(buf, "UNIX domain socket %lu (%s, %s) ", ino, tp,
data/qps-2.0.0/src/proc_linux.cpp:1366:9:  [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(str, path);
data/qps-2.0.0/src/proc_linux.cpp:1367:9:  [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(str, e->d_name);
data/qps-2.0.0/src/proc_linux.cpp:1380:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "/proc/net/%s", filename);
data/qps-2.0.0/src/proc_linux.cpp:1432: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(path, PROCDIR);
data/qps-2.0.0/src/proc_linux.cpp:1582:13:  [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(envblock, buf);
data/qps-2.0.0/src/proc_linux.cpp:1626:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/task/%d/%s", p->pid, p->pid, dir);
data/qps-2.0.0/src/proc_linux.cpp:1628:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(path, "/proc/%d/%s", p->pid, dir);
data/qps-2.0.0/src/proc_linux.cpp:1744:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%.3f", p->tms);
data/qps-2.0.0/src/proc_linux.cpp:1763:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%lx", p->affcpu);
data/qps-2.0.0/src/proc_mosix.cpp:220:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d", procdir, proc_pid);
data/qps-2.0.0/src/proc_mosix.cpp:222: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(buf, path);
data/qps-2.0.0/src/proc_mosix.cpp:246: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(buf, path);
data/qps-2.0.0/src/proc_mosix.cpp:294: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(buf, path);
data/qps-2.0.0/src/proc_mosix.cpp:318:9:  [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(buf, path);
data/qps-2.0.0/src/proc_mosix.cpp:328:9:  [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(buf, path);
data/qps-2.0.0/src/proc_mosix.cpp:341:9:  [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(buf, path);
data/qps-2.0.0/src/proc_mosix.cpp:351:9:  [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(buf, path);
data/qps-2.0.0/src/proc_mosix.cpp:364:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path2, "%s/mosix/remote/%d", procdir, pid);
data/qps-2.0.0/src/proc_mosix.cpp:367:9:  [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(buf, path2);
data/qps-2.0.0/src/proc_mosix.cpp:386:13:  [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(buf, path2);
data/qps-2.0.0/src/proc_mosix.cpp:415: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(buf, path); // /proc/$PID
data/qps-2.0.0/src/proc_mosix.cpp:436:13:  [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(buf, path);   // /proc/$PID
data/qps-2.0.0/src/proc_mosix.cpp:475:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/psinfo", procdir, proc_pid);
data/qps-2.0.0/src/proc_mosix.cpp:480:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/usage", procdir, proc_pid);
data/qps-2.0.0/src/proc_mosix.cpp:568: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(path, procdir);
data/qps-2.0.0/src/proc_mosix.cpp:636: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(path, procdir);
data/qps-2.0.0/src/proc_mosix.cpp:652: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(path, procdir);
data/qps-2.0.0/src/proc_mosix.cpp:816: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(path, procdir);
data/qps-2.0.0/src/proc_mosix.cpp:832: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(path, procdir);
data/qps-2.0.0/src/proc_mosix.cpp:898:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buf, "%sp socket %lu",
data/qps-2.0.0/src/proc_mosix.cpp:938:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(buf, "unix domain socket %lu (%s, %s) ", ino, tp,
data/qps-2.0.0/src/proc_mosix.cpp:986:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("char device %u:%u", (unsigned)major(sb.st_rdev),
data/qps-2.0.0/src/proc_mosix.cpp:991:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("block device %u:%u", (unsigned)major(sb.st_rdev),
data/qps-2.0.0/src/proc_mosix.cpp:1037:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%s, dev %u:%u inode %u", n, (unsigned)major(sb.st_dev),
data/qps-2.0.0/src/proc_mosix.cpp:1050:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/fd", procdir, pid);
data/qps-2.0.0/src/proc_mosix.cpp:1074:9:  [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, e->d_name);
data/qps-2.0.0/src/proc_mosix.cpp:1087: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(path, procdir);
data/qps-2.0.0/src/proc_mosix.cpp:1089:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(path, pseudofile);
data/qps-2.0.0/src/proc_mosix.cpp:1122: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(path, procdir);
data/qps-2.0.0/src/proc_mosix.cpp:1184:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(name, "%s/%d/maps", procdir, pid);
data/qps-2.0.0/src/proc_mosix.cpp:1225:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/environ", procdir, pid);
data/qps-2.0.0/src/proc_mosix.cpp:1324:18:  [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.
    FILE *pmap = popen(buf, "r");
data/qps-2.0.0/src/proc_mosix.cpp:1390:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(name, "%s/%d/map", procdir, pid);
data/qps-2.0.0/src/proc_mosix.cpp:1416:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(obj, "%s/%d/object/%s", procdir, pid, pm.pr_mapname);
data/qps-2.0.0/src/proc_mosix.cpp:1509:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%8x", (unsigned)(p->*uintl_member));
data/qps-2.0.0/src/proc_mosix.cpp:1639:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "%s/%d/%s", procdir, p->pid, dir);
data/qps-2.0.0/src/proc_mosix.cpp:1781:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%1d.%02ds", t, hundreds);
data/qps-2.0.0/src/proc_mosix.cpp:1785:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%2d:%02d", t / 60, t % 60);
data/qps-2.0.0/src/proc_mosix.cpp:1791:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%2d:%02dh", h, t / 60);
data/qps-2.0.0/src/proc_mosix.cpp:1797:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%dd%dh", d, t / 3600);
data/qps-2.0.0/src/proc_mosix.cpp:1855:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    s.sprintf("%01.2f", (double)(p->*float_member));
data/qps-2.0.0/src/proc_mosix.cpp:2145:9:  [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(path, procdir);
data/qps-2.0.0/src/proc_solaris.cpp:226:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/lwp", procdir, pid);
data/qps-2.0.0/src/proc_solaris.cpp:317:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/psinfo", procdir, pid);
data/qps-2.0.0/src/proc_solaris.cpp:323:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/usage", procdir, pid);
data/qps-2.0.0/src/proc_solaris.cpp:447:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(ppath, "%s/%d/lwp/%d/lwpsinfo", procdir, proc_pid, thread);
data/qps-2.0.0/src/proc_solaris.cpp:448:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(upath, "%s/%d/lwp/%d/lwpusage", procdir, proc_pid, thread);
data/qps-2.0.0/src/proc_solaris.cpp:716:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("char device %u:%u", (unsigned)major(sb.st_rdev),
data/qps-2.0.0/src/proc_solaris.cpp:721:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("block device %u:%u", (unsigned)major(sb.st_rdev),
data/qps-2.0.0/src/proc_solaris.cpp:767:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%s, dev %u:%u inode %u", n, (unsigned)major(sb.st_dev),
data/qps-2.0.0/src/proc_solaris.cpp:780:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s/%d/fd", procdir, pid);
data/qps-2.0.0/src/proc_solaris.cpp:794:9:  [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, e->d_name);
data/qps-2.0.0/src/proc_solaris.cpp:856:18:  [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.
    FILE *pmap = popen(buf, "r");
data/qps-2.0.0/src/proc_solaris.cpp:923:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(name, "%s/%d/map", procdir, pid);
data/qps-2.0.0/src/proc_solaris.cpp:946:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(obj, "%s/%d/object/%s", procdir, pid, pm.pr_mapname);
data/qps-2.0.0/src/proc_solaris.cpp:989:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path, "/proc/%d/%s", p->pid, dir);
data/qps-2.0.0/src/proc_solaris.cpp:1085:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%1d.%02ds", t, hundreds);
data/qps-2.0.0/src/proc_solaris.cpp:1089:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%2d:%02d", t / 60, t % 60);
data/qps-2.0.0/src/proc_solaris.cpp:1095:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%2d:%02dh", h, t / 60);
data/qps-2.0.0/src/proc_solaris.cpp:1101:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s.sprintf("%dd%dh", d, t / 3600);
data/qps-2.0.0/src/pstable.cpp:365: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(buff, name.c_str());
data/qps-2.0.0/src/pstable.cpp:366:5:  [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(buff, mem_str);
data/qps-2.0.0/src/qps.cpp:527:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        buf.sprintf("to node %d", lst[i]);
data/qps-2.0.0/src/qps.cpp:1220:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        txt.sprintf("%d s", update_period / 1000);
data/qps-2.0.0/src/qps.cpp:1222:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        txt.sprintf("%d ms", update_period);
data/qps-2.0.0/src/svec.cpp:33:15:  [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 fatal printf
data/qps-2.0.0/src/ttystr.cpp:149:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(name, "%s%c%d", ttytab[i].callout ? "cu" : "",
data/qps-2.0.0/src/ttystr.cpp:193:5:  [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(dirname, prefix);
data/qps-2.0.0/src/ttystr.cpp:202:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(name, "/dev%s/%s", prefix, e->d_name);
data/qps-2.0.0/src/wchan.cpp:46:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(p, sizeof(long) == 8 ? "%016lx" : "%08lx", x);
data/qps-2.0.0/src/wchan.cpp:63:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buf, sizeof(long) == 8 ? "%016lx" : "%08lx", addr);
data/qps-2.0.0/src/wchan.cpp:88:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(buf, *p, ub.release);
data/qps-2.0.0/src/wchan.cpp:179:17:  [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.
                sscanf(sysmap + m, "%lx %*c %s", &a, buf);
data/qps-2.0.0/src/wchan.cpp:190:9:  [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.
        sscanf(sysmap + m, "%lx %*c %s", &a, buf);
data/qps-2.0.0/src/qps.cpp:1847:45:  [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.
    QString caption( QString( "%1@%2").arg( getenv( "USER" ) )
data/qps-2.0.0/src/details.cpp:460: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 buf[80];
data/qps-2.0.0/src/infobar.cpp:181: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 buff[32] = "NO";
data/qps-2.0.0/src/infobar.cpp:273: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 buff[32] = "NO";
data/qps-2.0.0/src/infobar.cpp:357: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 str_buff[512];
data/qps-2.0.0/src/infobar.cpp:371: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 buff[32];
data/qps-2.0.0/src/infobar.cpp:439:17:  [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(buff, "%d", cpu_id);
data/qps-2.0.0/src/infobar.cpp:474: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 str[80];
data/qps-2.0.0/src/infobar.cpp:482: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(str_buff, "user: %1.1f%%  system:%1.1f%%  nice:%1.1f%% ",
data/qps-2.0.0/src/infobar.cpp:487: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(str_buff, "user: %1.1f%%  system:%1.1f%%  nice:%1.1f%% ",
data/qps-2.0.0/src/infobar.cpp:518: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 str[80];
data/qps-2.0.0/src/infobar.cpp:520:9:  [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(str_buff, "Total: ");
data/qps-2.0.0/src/infobar.cpp:524:9:  [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(str_buff, "  used: ");
data/qps-2.0.0/src/infobar.cpp:529:9:  [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(str_buff, "  cached: ");
data/qps-2.0.0/src/infobar.cpp:532:9:  [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(str_buff, "  buffer: ");
data/qps-2.0.0/src/infobar.cpp:559: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 str[80];
data/qps-2.0.0/src/infobar.cpp:561:9:  [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(str_buff, "Total: ");
data/qps-2.0.0/src/infobar.cpp:564:9:  [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(str_buff, "  Free: ");
data/qps-2.0.0/src/infobar.cpp:567:9:  [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(str_buff, "  Used: ");
data/qps-2.0.0/src/infobar.cpp:580: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 buff[1024];
data/qps-2.0.0/src/infobar.cpp:593:13:  [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(buff, "UPTIME %d:%02d", up_mins, sec);
data/qps-2.0.0/src/infobar.cpp:595:13:  [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(buff, "UPTIME %d:%02d:%02d", up_hrs, up_mins, sec);
data/qps-2.0.0/src/infobar.cpp:619: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 buff[64];
data/qps-2.0.0/src/infobar.cpp:622: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(buff, " 1m:%1.02f 5m:%1.02f 15m:%1.02f", procview->loadavg[0],
data/qps-2.0.0/src/infobar.cpp:639: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 str[2] = {0, 0};
data/qps-2.0.0/src/infobar.cpp:811: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 buf[128];
data/qps-2.0.0/src/infobar.cpp:813: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(buf, "miniHistory CPU");
data/qps-2.0.0/src/infobar.cpp:826: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(buf, " (%.01f%%)", p->pcpu);
data/qps-2.0.0/src/infobar.cpp:839: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 buf[128];
data/qps-2.0.0/src/infobar.cpp:841: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(buf, "%%CPU miniHistory test");
data/qps-2.0.0/src/infobar.cpp:847: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(buf, " (%.02f%%)", p->pcpu);
data/qps-2.0.0/src/infobar.cpp:907: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 buf[64], mem_str[64];
data/qps-2.0.0/src/infobar.cpp:909: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(buf, "miniHistory IO");
data/qps-2.0.0/src/infobar.cpp:1317: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 buff[128];
data/qps-2.0.0/src/lookup.cpp:191: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[256];
data/qps-2.0.0/src/lookup.cpp:195:13:  [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.%d.%d.%d", (a >> 24) & 0xff, (a >> 16) & 0xff,
data/qps-2.0.0/src/lookup.cpp:216: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 buf[256];
data/qps-2.0.0/src/misc.cpp:202: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 sstr[32];
data/qps-2.0.0/src/misc.cpp:245: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).
        int fd = open(fname, O_RDONLY);
data/qps-2.0.0/src/misc.cpp:256: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).
    int fd = open(fname, O_RDONLY);
data/qps-2.0.0/src/misc.cpp:299:13:  [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, "%uGB", mb >> 10);
data/qps-2.0.0/src/misc.cpp:301:13:  [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, "%uMB", mb);
data/qps-2.0.0/src/misc.cpp:304: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(buf, "%uKB", kbytes);
data/qps-2.0.0/src/misc.cpp:312:13:  [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, "%uGb", meg >> 10);
data/qps-2.0.0/src/misc.cpp:314:13:  [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, "%uMb", meg);
data/qps-2.0.0/src/misc.cpp:317: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(buf, "%uKb", kbytes);
data/qps-2.0.0/src/misc.cpp:653: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 strong_buff[128];
data/qps-2.0.0/src/misc.cpp:999: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 sstr[32] = "pu%s";
data/qps-2.0.0/src/misc.cpp:1000: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[128];
data/qps-2.0.0/src/proc.cpp:127: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).
    int fd = open(name, O_RDONLY);
data/qps-2.0.0/src/proc.cpp:138: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 buffer_proc[1024 * 4]; // enough..maybe
data/qps-2.0.0/src/proc.cpp:143: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 path[256];
data/qps-2.0.0/src/proc.cpp:167: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).
    int fd = open(path, O_RDONLY);
data/qps-2.0.0/src/proc.cpp:189: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 path[256];
data/qps-2.0.0/src/proc.cpp:207: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).
    int fd = open(path, O_RDONLY);
data/qps-2.0.0/src/proc.cpp:234: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 path[256];
data/qps-2.0.0/src/proc.cpp:235: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 buffer[256], fname[256];
data/qps-2.0.0/src/proc.cpp:240: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(path, "/proc/%d/fd", pid);
data/qps-2.0.0/src/proc.cpp:411: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 path[256];
data/qps-2.0.0/src/proc.cpp:417: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(path, "/proc/%d/task", pid);
data/qps-2.0.0/src/proc.cpp:428:22:  [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).
        thread_pid = atoi(e->d_name);
data/qps-2.0.0/src/proc.cpp:481:5:  [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(hashstr, sbuf, statlen); // to back
data/qps-2.0.0/src/proc.cpp:493: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 cmdbuf[MAX_CMD_LEN];
data/qps-2.0.0/src/proc.cpp:494: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 path[64];
data/qps-2.0.0/src/proc.cpp:506: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(path, "/proc/%d/task/%d", tgid, pid);
data/qps-2.0.0/src/proc.cpp:509: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(path, "/proc/%d", pid);
data/qps-2.0.0/src/proc.cpp:558: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 cmdline_cmd[4096]; // some cmdline very large!  ex)chrome
data/qps-2.0.0/src/proc.cpp:910: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 path[80];
data/qps-2.0.0/src/proc.cpp:911: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 buf[512];
data/qps-2.0.0/src/proc.cpp:913:5:  [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(path, "/proc/loadavg");
data/qps-2.0.0/src/proc.cpp:927: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 path[80];
data/qps-2.0.0/src/proc.cpp:928: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 buf[1024 * 8]; // for SMP
data/qps-2.0.0/src/proc.cpp:932:5:  [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(path, "/proc/stat");
data/qps-2.0.0/src/proc.cpp:965: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 path[80];
data/qps-2.0.0/src/proc.cpp:966: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 buf[1024 * 8]; // for SMP
data/qps-2.0.0/src/proc.cpp:974:9:  [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(path, "/proc/vmstat");
data/qps-2.0.0/src/proc.cpp:981:9:  [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(path, "/proc/1/task");
data/qps-2.0.0/src/proc.cpp:988:9:  [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(path, "/proc/1/schedstat"); // some system doesn't have
data/qps-2.0.0/src/proc.cpp:994:9:  [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(path, "/proc/stat");
data/qps-2.0.0/src/proc.cpp:1030:5:  [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(path, "/proc/stat");
data/qps-2.0.0/src/proc.cpp:1143: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 cpu_buf[10];
data/qps-2.0.0/src/proc.cpp:1144: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(cpu_buf, "cpu%d", cpu);
data/qps-2.0.0/src/proc.cpp:1178: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(path, "/meminfo");
data/qps-2.0.0/src/proc.cpp:1251: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 buf[128];
data/qps-2.0.0/src/proc.cpp:1276:13:  [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[80];
data/qps-2.0.0/src/proc.cpp:1348: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 path[128], *p;
data/qps-2.0.0/src/proc.cpp:1350: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(path, "/proc/%d/task/%d/fd", pid, pid);
data/qps-2.0.0/src/proc.cpp:1352: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(path, "/proc/%d/fd", pid);
data/qps-2.0.0/src/proc.cpp:1368: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 str[128];
data/qps-2.0.0/src/proc.cpp:1371:21:  [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).
        int fdnum = atoi(e->d_name);
data/qps-2.0.0/src/proc.cpp:1385: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 path[80];
data/qps-2.0.0/src/proc.cpp:1387:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(path, "r");
data/qps-2.0.0/src/proc.cpp:1391: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 buf[128 * 3];
data/qps-2.0.0/src/proc.cpp:1437: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 path[80];
data/qps-2.0.0/src/proc.cpp:1439: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(path, "/net/unix");
data/qps-2.0.0/src/proc.cpp:1440:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(path, "r");
data/qps-2.0.0/src/proc.cpp:1444: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 buf[256];
data/qps-2.0.0/src/proc.cpp:1518: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 name[80];
data/qps-2.0.0/src/proc.cpp:1521: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(name, "/proc/%d/task/%d/maps", pid, pid);
data/qps-2.0.0/src/proc.cpp:1523: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(name, "/proc/%d/maps", pid);
data/qps-2.0.0/src/proc.cpp:1525:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(name, "r");
data/qps-2.0.0/src/proc.cpp:1529: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 line[1024]; // lines can be longer , SEGFAULT
data/qps-2.0.0/src/proc.cpp:1566: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 path[256];
data/qps-2.0.0/src/proc.cpp:1570: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(path, "/proc/%d/task/%d/environ", pid, pid);
data/qps-2.0.0/src/proc.cpp:1572: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(path, "/proc/%d/environ", pid);
data/qps-2.0.0/src/proc.cpp:1621: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 path[128], buf[512];
data/qps-2.0.0/src/proc.cpp:1780: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 buff[64];
data/qps-2.0.0/src/proc.cpp:1794: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(buff, "%1d.%02ds", t, ms);
data/qps-2.0.0/src/proc.cpp:1798: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(buff, "%5ds", t);
data/qps-2.0.0/src/proc.cpp:1802: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(buff, "%2d.%1dm", t / 60, (t % 60) / 6);
data/qps-2.0.0/src/proc.cpp:1806: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(buff, "%5dm", t / 60);
data/qps-2.0.0/src/proc.cpp:1812: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(buff, "%2d:%02d", h, t / 60);
data/qps-2.0.0/src/proc.cpp:1818: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(buff, "%2d.%1dd", d, (t * 10 / (3600 * 24)));
data/qps-2.0.0/src/proc.cpp:1823: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(buff, "%5dd", d);
data/qps-2.0.0/src/proc.cpp:2001: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).
            pid = atoi(e->d_name);
data/qps-2.0.0/src/proc.cpp:2144: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 str[32];
data/qps-2.0.0/src/proc.h:187: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 perm[4];     // "rwx[ps]"; last is private/shared flag
data/qps-2.0.0/src/proc.h:503: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 hashstr[128 * 8]; // cache
data/qps-2.0.0/src/proc.h:581: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 policy_name[2]; // two first letters of scheduling class
data/qps-2.0.0/src/proc_common.cpp:55: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 buff[128];
data/qps-2.0.0/src/proc_common.cpp:60: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(buff, "%d", uid);
data/qps-2.0.0/src/proc_linux.cpp:127: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).
    int fd = open(name, O_RDONLY);
data/qps-2.0.0/src/proc_linux.cpp:138: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 buffer_proc[1024 * 4]; // enough..maybe
data/qps-2.0.0/src/proc_linux.cpp:143: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 path[256];
data/qps-2.0.0/src/proc_linux.cpp:167: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).
    int fd = open(path, O_RDONLY);
data/qps-2.0.0/src/proc_linux.cpp:189: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 path[256];
data/qps-2.0.0/src/proc_linux.cpp:207: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).
    int fd = open(path, O_RDONLY);
data/qps-2.0.0/src/proc_linux.cpp:237: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 path[256];
data/qps-2.0.0/src/proc_linux.cpp:238: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 buffer[256], fname[256];
data/qps-2.0.0/src/proc_linux.cpp:243: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(path, "/proc/%d/fd", pid);
data/qps-2.0.0/src/proc_linux.cpp:405: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 path[256];
data/qps-2.0.0/src/proc_linux.cpp:411: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(path, "/proc/%d/task", pid);
data/qps-2.0.0/src/proc_linux.cpp:422:22:  [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).
        thread_pid = atoi(e->d_name);
data/qps-2.0.0/src/proc_linux.cpp:475:5:  [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(hashstr, sbuf, statlen); // to back
data/qps-2.0.0/src/proc_linux.cpp:487: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 cmdbuf[MAX_CMD_LEN];
data/qps-2.0.0/src/proc_linux.cpp:488: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 path[64];
data/qps-2.0.0/src/proc_linux.cpp:500: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(path, "/proc/%d/task/%d", tgid, pid);
data/qps-2.0.0/src/proc_linux.cpp:503: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(path, "/proc/%d", pid);
data/qps-2.0.0/src/proc_linux.cpp:552: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 cmdline_cmd[4096]; // some cmdline very large!  ex)chrome
data/qps-2.0.0/src/proc_linux.cpp:904: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 path[80];
data/qps-2.0.0/src/proc_linux.cpp:905: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 buf[512];
data/qps-2.0.0/src/proc_linux.cpp:907:5:  [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(path, "/proc/loadavg");
data/qps-2.0.0/src/proc_linux.cpp:921: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 path[80];
data/qps-2.0.0/src/proc_linux.cpp:922: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 buf[1024 * 8]; // for SMP
data/qps-2.0.0/src/proc_linux.cpp:926:5:  [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(path, "/proc/stat");
data/qps-2.0.0/src/proc_linux.cpp:960: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 path[80];
data/qps-2.0.0/src/proc_linux.cpp:961: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 buf[1024 * 8]; // for SMP
data/qps-2.0.0/src/proc_linux.cpp:969:9:  [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(path, "/proc/vmstat");
data/qps-2.0.0/src/proc_linux.cpp:976:9:  [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(path, "/proc/1/task");
data/qps-2.0.0/src/proc_linux.cpp:983:9:  [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(path, "/proc/1/schedstat"); // some system doesn't have
data/qps-2.0.0/src/proc_linux.cpp:989:9:  [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(path, "/proc/stat");
data/qps-2.0.0/src/proc_linux.cpp:1025:5:  [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(path, "/proc/stat");
data/qps-2.0.0/src/proc_linux.cpp:1138: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 cpu_buf[10];
data/qps-2.0.0/src/proc_linux.cpp:1139: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(cpu_buf, "cpu%d", cpu);
data/qps-2.0.0/src/proc_linux.cpp:1172: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(path, "/meminfo");
data/qps-2.0.0/src/proc_linux.cpp:1245: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 buf[128];
data/qps-2.0.0/src/proc_linux.cpp:1270:13:  [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[80];
data/qps-2.0.0/src/proc_linux.cpp:1342: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 path[128], *p;
data/qps-2.0.0/src/proc_linux.cpp:1344: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(path, "/proc/%d/task/%d/fd", pid, pid);
data/qps-2.0.0/src/proc_linux.cpp:1346: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(path, "/proc/%d/fd", pid);
data/qps-2.0.0/src/proc_linux.cpp:1362: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 str[128];
data/qps-2.0.0/src/proc_linux.cpp:1365:21:  [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).
        int fdnum = atoi(e->d_name);
data/qps-2.0.0/src/proc_linux.cpp:1379: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 path[80];
data/qps-2.0.0/src/proc_linux.cpp:1381:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(path, "r");
data/qps-2.0.0/src/proc_linux.cpp:1385: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 buf[128 * 3];
data/qps-2.0.0/src/proc_linux.cpp:1431: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 path[80];
data/qps-2.0.0/src/proc_linux.cpp:1433: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(path, "/net/unix");
data/qps-2.0.0/src/proc_linux.cpp:1434:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(path, "r");
data/qps-2.0.0/src/proc_linux.cpp:1438: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 buf[256];
data/qps-2.0.0/src/proc_linux.cpp:1508: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 name[80];
data/qps-2.0.0/src/proc_linux.cpp:1511: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(name, "/proc/%d/task/%d/maps", pid, pid);
data/qps-2.0.0/src/proc_linux.cpp:1513: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(name, "/proc/%d/maps", pid);
data/qps-2.0.0/src/proc_linux.cpp:1515:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(name, "r");
data/qps-2.0.0/src/proc_linux.cpp:1519: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 line[1024]; // lines can be longer , SEGFAULT
data/qps-2.0.0/src/proc_linux.cpp:1556: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 path[256];
data/qps-2.0.0/src/proc_linux.cpp:1560: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(path, "/proc/%d/task/%d/environ", pid, pid);
data/qps-2.0.0/src/proc_linux.cpp:1562: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(path, "/proc/%d/environ", pid);
data/qps-2.0.0/src/proc_linux.cpp:1576: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[128];
data/qps-2.0.0/src/proc_linux.cpp:1577: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(buf, "Kernel Bug= wrong environments !  please, check "
data/qps-2.0.0/src/proc_linux.cpp:1623: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 path[128], buf[512];
data/qps-2.0.0/src/proc_linux.cpp:1782: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 buff[64];
data/qps-2.0.0/src/proc_linux.cpp:1796: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(buff, "%1d.%02ds", t, ms);
data/qps-2.0.0/src/proc_linux.cpp:1800: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(buff, "%5ds", t);
data/qps-2.0.0/src/proc_linux.cpp:1804: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(buff, "%2d.%1dm", t / 60, (t % 60) / 6);
data/qps-2.0.0/src/proc_linux.cpp:1808: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(buff, "%5dm", t / 60);
data/qps-2.0.0/src/proc_linux.cpp:1814: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(buff, "%2d:%02d", h, t / 60);
data/qps-2.0.0/src/proc_linux.cpp:1820: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(buff, "%2d.%1dd", d, (t * 10 / (3600 * 24)));
data/qps-2.0.0/src/proc_linux.cpp:1825: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(buff, "%5dd", d);
data/qps-2.0.0/src/proc_linux.cpp:2023: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).
            pid = atoi(e->d_name);
data/qps-2.0.0/src/proc_linux.cpp:2166: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 str[32];
data/qps-2.0.0/src/proc_mosix.cpp:61: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 procdir[128] = "/proc";
data/qps-2.0.0/src/proc_mosix.cpp:117: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).
    int fd = open(name, O_RDONLY);
data/qps-2.0.0/src/proc_mosix.cpp:148: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 path[256];
data/qps-2.0.0/src/proc_mosix.cpp:155: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(path, "/proc/%d/task", pid);
data/qps-2.0.0/src/proc_mosix.cpp:180: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).
        TID = atoi(e->d_name); // only numbre !!
data/qps-2.0.0/src/proc_mosix.cpp:185:13:  [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(procdir, "/proc/%d/task", pid, TID);
data/qps-2.0.0/src/proc_mosix.cpp:212: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 path[256];
data/qps-2.0.0/src/proc_mosix.cpp:213: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 buf[256];
data/qps-2.0.0/src/proc_mosix.cpp:214: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 sbuf[4096]; // should be enough to acommodate /proc/X/stat
data/qps-2.0.0/src/proc_mosix.cpp:215: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 cmdbuf[MAX_CMD_LEN];
data/qps-2.0.0/src/proc_mosix.cpp:223: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(buf, "/cmdline");
data/qps-2.0.0/src/proc_mosix.cpp:247: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(buf, "/stat");
data/qps-2.0.0/src/proc_mosix.cpp:295: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(buf, "/statm");
data/qps-2.0.0/src/proc_mosix.cpp:319:9:  [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(buf, "/where");
data/qps-2.0.0/src/proc_mosix.cpp:329:9:  [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(buf, "/cantmove");
data/qps-2.0.0/src/proc_mosix.cpp:342:9:  [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(buf, "/nmigs");
data/qps-2.0.0/src/proc_mosix.cpp:352:9:  [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(buf, "/lock");
data/qps-2.0.0/src/proc_mosix.cpp:363: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 path2[256];
data/qps-2.0.0/src/proc_mosix.cpp:368:9:  [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(buf, "/stats");
data/qps-2.0.0/src/proc_mosix.cpp:387:13:  [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(buf, "/from");
data/qps-2.0.0/src/proc_mosix.cpp:405:13:  [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>", from);
data/qps-2.0.0/src/proc_mosix.cpp:407:13:  [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", where);
data/qps-2.0.0/src/proc_mosix.cpp:416: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(buf, "/status");
data/qps-2.0.0/src/proc_mosix.cpp:437:13:  [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(buf, "/cpu"); // /proc/$PID/cpu
data/qps-2.0.0/src/proc_mosix.cpp:471: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 path[256];
data/qps-2.0.0/src/proc_mosix.cpp:566: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 path[80];
data/qps-2.0.0/src/proc_mosix.cpp:567: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 buf[512];
data/qps-2.0.0/src/proc_mosix.cpp:569: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(path, "/loadavg");
data/qps-2.0.0/src/proc_mosix.cpp:619: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 path[80];
data/qps-2.0.0/src/proc_mosix.cpp:620: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 buf[4096 + 1];
data/qps-2.0.0/src/proc_mosix.cpp:627:5:  [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(path, "/proc/version");
data/qps-2.0.0/src/proc_mosix.cpp:637: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(path, "/meminfo");
data/qps-2.0.0/src/proc_mosix.cpp:653: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(path, "/stat"); // /proc/stat
data/qps-2.0.0/src/proc_mosix.cpp:709:13:  [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 cpu_buf[10];
data/qps-2.0.0/src/proc_mosix.cpp:710:13:  [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(cpu_buf, "cpu%d", cpu);
data/qps-2.0.0/src/proc_mosix.cpp:754: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 path_buf[PATH_MAX + 1];
data/qps-2.0.0/src/proc_mosix.cpp:815: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 path[256];
data/qps-2.0.0/src/proc_mosix.cpp:817: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(path, "/mosix");
data/qps-2.0.0/src/proc_mosix.cpp:831: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 path[256];
data/qps-2.0.0/src/proc_mosix.cpp:833: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(path, "/mosix/nodes");
data/qps-2.0.0/src/proc_mosix.cpp:872: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 buf[80];
data/qps-2.0.0/src/proc_mosix.cpp:893:13:  [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[80];
data/qps-2.0.0/src/proc_mosix.cpp:1005:13:  [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[512];
data/qps-2.0.0/src/proc_mosix.cpp:1049: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 path[80], *p;
data/qps-2.0.0/src/proc_mosix.cpp:1075:21:  [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).
        int fdnum = atoi(p);
data/qps-2.0.0/src/proc_mosix.cpp:1086: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 path[80];
data/qps-2.0.0/src/proc_mosix.cpp:1088: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(path, "/net/");
data/qps-2.0.0/src/proc_mosix.cpp:1090:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(path, "r");
data/qps-2.0.0/src/proc_mosix.cpp:1094: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 buf[256];
data/qps-2.0.0/src/proc_mosix.cpp:1121: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 path[80];
data/qps-2.0.0/src/proc_mosix.cpp:1123: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(path, "/net/unix");
data/qps-2.0.0/src/proc_mosix.cpp:1124:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(path, "r");
data/qps-2.0.0/src/proc_mosix.cpp:1128: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 buf[256];
data/qps-2.0.0/src/proc_mosix.cpp:1183: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 name[80];
data/qps-2.0.0/src/proc_mosix.cpp:1185:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(name, "r");
data/qps-2.0.0/src/proc_mosix.cpp:1188: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 line[1024]; // lines can be this long, or longer
data/qps-2.0.0/src/proc_mosix.cpp:1224: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 path[128];
data/qps-2.0.0/src/proc_mosix.cpp:1226: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).
    int fd = open(path, O_RDONLY);
data/qps-2.0.0/src/proc_mosix.cpp:1276: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 file[128];
data/qps-2.0.0/src/proc_mosix.cpp:1277: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(file, "/proc/%d/as", pid);
data/qps-2.0.0/src/proc_mosix.cpp:1278:15:  [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(file, O_RDONLY)) < 0)
data/qps-2.0.0/src/proc_mosix.cpp:1301:55:  [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.
    for (int i = 0; i * (int)sizeof(char *) < bs && ((char **)envblock)[i]; i++)
data/qps-2.0.0/src/proc_mosix.cpp:1303:19:  [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.
        int b = ((char **)envblock)[i] - (char *)env_ofs;
data/qps-2.0.0/src/proc_mosix.cpp:1322: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 buf[256];
data/qps-2.0.0/src/proc_mosix.cpp:1323: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(buf, "/usr/proc/bin/pmap %d 2>/dev/null", pid);
data/qps-2.0.0/src/proc_mosix.cpp:1389: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 name[128];
data/qps-2.0.0/src/proc_mosix.cpp:1391:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(name, "r");
data/qps-2.0.0/src/proc_mosix.cpp:1415:13:  [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 obj[128];
data/qps-2.0.0/src/proc_mosix.cpp:1638: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 path[128], buf[512];
data/qps-2.0.0/src/proc_mosix.cpp:2127: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).
            pid = atoi(e->d_name);
data/qps-2.0.0/src/proc_mosix.cpp:2144: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 path[256];
data/qps-2.0.0/src/proc_mosix.cpp:2146:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(path, "/mosix/remote");
data/qps-2.0.0/src/proc_mosix.cpp:2154:49:  [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).
                    Procinfo *pi = new Procinfo(atoi(e->d_name));
data/qps-2.0.0/src/proc_solaris.cpp:70: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 procdir[128] = "/proc";
data/qps-2.0.0/src/proc_solaris.cpp:82: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 path[128];
data/qps-2.0.0/src/proc_solaris.cpp:85: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(path, "/proc/%d/fd", pid);
data/qps-2.0.0/src/proc_solaris.cpp:206: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).
    int fd = open(name, O_RDONLY);
data/qps-2.0.0/src/proc_solaris.cpp:219: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 path[256];
data/qps-2.0.0/src/proc_solaris.cpp:238:22:  [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).
        thread_pid = atoi(e->d_name); // only number !!
data/qps-2.0.0/src/proc_solaris.cpp:313: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 path[256];
data/qps-2.0.0/src/proc_solaris.cpp:431: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 ppath[256];
data/qps-2.0.0/src/proc_solaris.cpp:432: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 upath[256];
data/qps-2.0.0/src/proc_solaris.cpp:578: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 path_buf[PATH_MAX + 1];
data/qps-2.0.0/src/proc_solaris.cpp:735:13:  [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[512];
data/qps-2.0.0/src/proc_solaris.cpp:778: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 path[80], *p;
data/qps-2.0.0/src/proc_solaris.cpp:795:21:  [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).
        int fdnum = atoi(p);
data/qps-2.0.0/src/proc_solaris.cpp:806: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 file[128];
data/qps-2.0.0/src/proc_solaris.cpp:810: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(file, "/proc/%d/as", pid);
data/qps-2.0.0/src/proc_solaris.cpp:811:15:  [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(file, O_RDONLY)) < 0)
data/qps-2.0.0/src/proc_solaris.cpp:831:55:  [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.
    for (int i = 0; i * (int)sizeof(char *) < bs && ((char **)envblock)[i]; i++)
data/qps-2.0.0/src/proc_solaris.cpp:833:19:  [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.
        int b = ((char **)envblock)[i] - (char *)env_ofs;
data/qps-2.0.0/src/proc_solaris.cpp:852: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 buf[256];
data/qps-2.0.0/src/proc_solaris.cpp:854: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(buf, "/usr/proc/bin/pmap %d 2>/dev/null", pid);
data/qps-2.0.0/src/proc_solaris.cpp:922: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 name[128];
data/qps-2.0.0/src/proc_solaris.cpp:925:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(name, "r");
data/qps-2.0.0/src/proc_solaris.cpp:945:13:  [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 obj[128];
data/qps-2.0.0/src/proc_solaris.cpp:988: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 path[128], buf[512];
data/qps-2.0.0/src/proc_solaris.cpp:1244: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).
            pid = atoi(e->d_name);
data/qps-2.0.0/src/pstable.cpp:305:12:  [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 buff[48];
data/qps-2.0.0/src/pstable.cpp:306: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 mem_str[48];
data/qps-2.0.0/src/qps.cpp:1444:13:  [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[80];
data/qps-2.0.0/src/qps.cpp:1445:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buf, "/proc/%d/goto", p->pid);
data/qps-2.0.0/src/qps.cpp:1446:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            FILE *f = fopen(buf, "w");
data/qps-2.0.0/src/ttystr.cpp:78: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 name[40];
data/qps-2.0.0/src/ttystr.cpp:92:13:  [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(name, "%d", dmin);
data/qps-2.0.0/src/ttystr.cpp:97:13:  [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(name, "S%d", dmin - 64);
data/qps-2.0.0/src/ttystr.cpp:115:13:  [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(name, "tty");
data/qps-2.0.0/src/ttystr.cpp:119:13:  [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(name, "console");
data/qps-2.0.0/src/ttystr.cpp:123:13:  [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(name, "ptmx");
data/qps-2.0.0/src/ttystr.cpp:130:17:  [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(name, "cua%d", dmin - 64);
data/qps-2.0.0/src/ttystr.cpp:140:13:  [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(name, "pts/%d", ((dmaj - 136) << 8) + dmin);
data/qps-2.0.0/src/ttystr.cpp:192: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 dirname[80] = "/dev";
data/qps-2.0.0/src/ttystr.cpp:199: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 name[80];
data/qps-2.0.0/src/uidstr.cpp:45:13:  [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(p, "%d", uid);
data/qps-2.0.0/src/uidstr.cpp:68:13:  [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(p, "%d", gid);
data/qps-2.0.0/src/wchan.cpp:62: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 buf[sizeof(long) * 2 + 1];
data/qps-2.0.0/src/wchan.cpp:82: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[80];
data/qps-2.0.0/src/wchan.cpp:93: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 vstr[40];
data/qps-2.0.0/src/wchan.cpp:94:17:  [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(vstr, "Version_%d", (major << 16) + (minor << 8) + lvl);
data/qps-2.0.0/src/wchan.cpp:122: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).
    int fd = open(path, O_RDONLY);
data/qps-2.0.0/src/wchan.cpp:158: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[80];
data/qps-2.0.0/src/lookup.cpp:185:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int ret = read(fd, &addr, sizeof(addr));
data/qps-2.0.0/src/lookup.cpp:200:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, h->h_name, sizeof(buf));
data/qps-2.0.0/src/lookup.cpp:205:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int len = strlen(buf);
data/qps-2.0.0/src/lookup.cpp:218:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(sockfd, &addr, sizeof(addr)) <= 0 ||
data/qps-2.0.0/src/lookup.cpp:219:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(sockfd, &len, sizeof(len)) <= 0 || read(sockfd, buf, len) <= 0)
data/qps-2.0.0/src/lookup.cpp:219:49:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(sockfd, &len, sizeof(len)) <= 0 || read(sockfd, buf, len) <= 0)
data/qps-2.0.0/src/lookup.cpp:275: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).
    maxtitlelen = envp[-1] + strlen(envp[-1]) - argv0 - 2;
data/qps-2.0.0/src/lookup.cpp:283:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(argv0, txt, maxtitlelen - 1);
data/qps-2.0.0/src/misc.cpp:113:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(p, s, len);
data/qps-2.0.0/src/misc.cpp:204:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(sstr, fmt, n);
data/qps-2.0.0/src/misc.cpp:261:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(fd, buf, 1024);
data/qps-2.0.0/src/misc.cpp:702:11:  [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(str) * pf_width;
data/qps-2.0.0/src/misc.cpp:713:11:  [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(str);
data/qps-2.0.0/src/proc.cpp:130:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int r = read(fd, buf, max);
data/qps-2.0.0/src/proc.cpp:170:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(fd, buffer_proc, sizeof(buffer_proc) - 1); // return 0 , -1 ,
data/qps-2.0.0/src/proc.cpp:210:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(fd, buffer_proc,
data/qps-2.0.0/src/proc.cpp:242: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).
    path_len = strlen(path);
data/qps-2.0.0/src/proc.cpp:461: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).
    statlen = strlen(sbuf);
data/qps-2.0.0/src/proc.cpp:569: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).
            int cmdlen = strlen(buf);
data/qps-2.0.0/src/proc.cpp:1362:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(path, "/");
data/qps-2.0.0/src/proc.cpp:1449: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).
            buf[strlen(buf) - 1] = '\0'; // chomp newline
data/qps-2.0.0/src/proc.cpp:1541:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int len = strlen(line);
data/qps-2.0.0/src/proc_linux.cpp:130:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int r = read(fd, buf, max);
data/qps-2.0.0/src/proc_linux.cpp:170:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(fd, buffer_proc, sizeof(buffer_proc) - 1); // return 0 , -1 ,
data/qps-2.0.0/src/proc_linux.cpp:210:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(fd, buffer_proc,
data/qps-2.0.0/src/proc_linux.cpp:245: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).
    path_len = strlen(path);
data/qps-2.0.0/src/proc_linux.cpp:455: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).
    statlen = strlen(sbuf);
data/qps-2.0.0/src/proc_linux.cpp:563: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).
            int cmdlen = strlen(buf);
data/qps-2.0.0/src/proc_linux.cpp:1356:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(path, "/");
data/qps-2.0.0/src/proc_linux.cpp:1443: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).
            buf[strlen(buf) - 1] = '\0'; // chomp newline
data/qps-2.0.0/src/proc_linux.cpp:1531:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int len = strlen(line);
data/qps-2.0.0/src/proc_linux.cpp:1580: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).
        size = strlen(buf) + 1;
data/qps-2.0.0/src/proc_mosix.cpp:120:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int r = read(fd, buf, max);
data/qps-2.0.0/src/proc_mosix.cpp:409:13:  [1] (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 character.
            strcpy(buf, "-");
data/qps-2.0.0/src/proc_mosix.cpp:1066: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).
    p = path + strlen(path) + 1;
data/qps-2.0.0/src/proc_mosix.cpp:1133: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).
            buf[strlen(buf) - 1] = '\0'; // chomp newline
data/qps-2.0.0/src/proc_mosix.cpp:1202:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int len = strlen(line);
data/qps-2.0.0/src/proc_mosix.cpp:1235:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((n = read(fd, envblock + ofs, bs - ofs)) == bs - ofs)
data/qps-2.0.0/src/proc_mosix.cpp:1259:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            p = envblock + i + strlen(envblock + i);
data/qps-2.0.0/src/proc_mosix.cpp:1263: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).
        i = p - envblock + strlen(p) + 1;
data/qps-2.0.0/src/proc_mosix.cpp:1376: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).
        int l = strlen(buf + next);
data/qps-2.0.0/src/proc_solaris.cpp:209:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int r = read(fd, buf, max);
data/qps-2.0.0/src/proc_solaris.cpp:786: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).
    p = path + strlen(path) + 1;
data/qps-2.0.0/src/proc_solaris.cpp:909: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).
        int l = strlen(buf + next);
data/qps-2.0.0/src/qps.cpp:1739: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).
    return strncmp(arg, opt, strlen(opt)) == 0;
data/qps-2.0.0/src/ttystr.cpp:107:13:  [1] (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 character.
            strcpy(name, "?");
data/qps-2.0.0/src/ttystr.cpp:133:17:  [1] (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 character.
                strcpy(name, "?");
data/qps-2.0.0/src/ttystr.cpp:154:9:  [1] (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 character.
        strcpy(name, "?");

ANALYSIS SUMMARY:

Hits = 516
Lines analyzed = 26134 in approximately 0.61 seconds (43000 lines/second)
Physical Source Lines of Code (SLOC) = 18186
Hits@level = [0] 147 [1]  48 [2] 310 [3]   1 [4] 145 [5]  12
Hits@level+ = [0+] 663 [1+] 516 [2+] 468 [3+] 158 [4+] 157 [5+]  12
Hits/KSLOC@level+ = [0+] 36.4566 [1+] 28.3735 [2+] 25.7341 [3+] 8.688 [4+] 8.63301 [5+] 0.659848
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.