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/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/src/clipboard.h
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/src/clipboard_image_provider.h
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/src/main.cpp
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/src/utils.h
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/src/hsluv.c
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/src/hsluv.h
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/snapshot.h
Examining data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/test_hsluv.c

FINAL RESULTS:

data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:472:36:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static int TEST_ATTRIBUTE_(format (printf, 2, 3))
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:480:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buffer, sizeof(buffer), fmt, args);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:601:29:  [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.
int TEST_ATTRIBUTE_(format (printf, 4, 5))
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:652:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(fmt, args);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:665:30:  [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.
void TEST_ATTRIBUTE_(format (printf, 1, 2))
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:682:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(test_case_name_, sizeof(test_case_name_) - 1, fmt, args);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:694:30:  [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.
void TEST_ATTRIBUTE_(format (printf, 1, 2))
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:711:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buffer, TEST_MSG_MAXSIZE, fmt, args);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:751:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf((title[strlen(title)-1] == ':') ? "%s\n" : "%s:\n", title);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:892:37:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static void TEST_ATTRIBUTE_(format (printf, 1, 2))
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:905:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(fmt, args);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1239:33:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                                sprintf(auxbuf, "--%s", opt->longname);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:351:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char test_case_name_[64] = "";
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:476: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];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:542: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 spaces[48];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:697: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[TEST_MSG_MAXSIZE];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1053: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 tmp[32];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1064:35:  [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.
                    default:      sprintf(tmp, "signal %d", WTERMSIG(exit_code)); signame = tmp; break;
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1074: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[512] = {0};
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1181: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 badoptname[3];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1204: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 auxbuf[TEST_CMDLINE_AUXBUF_SIZE_+1];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1428:50:  [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).
            test_verbose_level_ = (arg != NULL ? atoi(arg) : test_verbose_level_+1);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1459:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            test_worker_index_ = atoi(arg);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1462:32:  [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).
            test_xml_output_ = fopen(arg, "w");
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1504: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+OVERLAP+1];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1509:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open("/proc/self/status", O_RDONLY);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1529:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            pid_t tracer_pid = (pid_t) atoi(field + sizeof(pattern) - 1);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1670: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 suite_name[_MAX_FNAME];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/snapshot.h:8:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char hex_str[8];
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/src/clipboard.h:63:16:  [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).
        buffer.open(QIODevice::WriteOnly);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/src/main.cpp:117:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            showFile.open(QIODevice::WriteOnly);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:751: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).
    printf((title[strlen(title)-1] == ':') ? "%s\n" : "%s:\n", title);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:834: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).
    pattern_len = strlen(pattern);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1224:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    size_t len = strlen(opt->longname);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1286:29:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                            strncpy(auxbuf, badoptname, len);
data/matrix-mirage-0.6.4~dfsg+~hsluv1.0.0/Xhsluv/tests/acutest.h:1520:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = read(fd, buf + n_read, sizeof(buf) - 1 - n_read);

ANALYSIS SUMMARY:

Hits = 36
Lines analyzed = 39744 in approximately 1.96 seconds (20231 lines/second)
Physical Source Lines of Code (SLOC) = 38903
Hits@level = [0] 108 [1]   5 [2]  19 [3]   0 [4]  12 [5]   0
Hits@level+ = [0+] 144 [1+]  36 [2+]  31 [3+]  12 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+] 3.70151 [1+] 0.925379 [2+] 0.796854 [3+] 0.30846 [4+] 0.30846 [5+]   0
Dot directories skipped = 2 (--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.