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/primus-vk-1.5/nv_vulkan_wrapper.cpp
Examining data/primus-vk-1.5/primus_vk.cpp
Examining data/primus-vk-1.5/primus_vk_diag.cpp
Examining data/primus-vk-1.5/primus_vk_forwarding.h
Examining data/primus-vk-1.5/primus_vk_forwarding_prototypes.h

FINAL RESULTS:

data/primus-vk-1.5/nv_vulkan_wrapper.cpp:91:16:  [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.
  char *prev = getenv("DISPLAY");
data/primus-vk-1.5/primus_vk.cpp:89:20:  [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.
    char *envstr = getenv(env.c_str());
data/primus-vk-1.5/primus_vk.cpp:178:36:  [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.
      const auto c_icd_filenames = getenv("VK_ICD_FILENAMES");
data/primus-vk-1.5/primus_vk.cpp:500:19:  [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.
    char *m_env = getenv("PRIMUS_VK_MULTITHREADING");
data/primus-vk-1.5/primus_vk.cpp:1068:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      std::memcpy(display_start, rendered_start, rendered_layout.size);
data/primus-vk-1.5/primus_vk.cpp:1076:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(display_start + display_offset, rendered_start + offset, minRowPitch);
data/primus-vk-1.5/primus_vk.cpp:1251: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(pProperties->layerName, "VK_LAYER_PRIMUS_PrimusVK");
data/primus-vk-1.5/primus_vk.cpp:1252: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(pProperties->description, "Primus-vk - https://github.com/felixdoerre/primus_vk");

ANALYSIS SUMMARY:

Hits = 8
Lines analyzed = 1815 in approximately 0.06 seconds (31760 lines/second)
Physical Source Lines of Code (SLOC) = 1571
Hits@level = [0]   1 [1]   0 [2]   4 [3]   4 [4]   0 [5]   0
Hits@level+ = [0+]   9 [1+]   8 [2+]   8 [3+]   4 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.72884 [1+] 5.0923 [2+] 5.0923 [3+] 2.54615 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.