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/vkd3d-1.1/demos/triangle_vs.h
Examining data/vkd3d-1.1/demos/gears_vs.h
Examining data/vkd3d-1.1/demos/triangle.c
Examining data/vkd3d-1.1/demos/gears_ps_flat.h
Examining data/vkd3d-1.1/demos/gears_ps_smooth.h
Examining data/vkd3d-1.1/demos/demo.h
Examining data/vkd3d-1.1/demos/triangle_ps.h
Examining data/vkd3d-1.1/demos/gears.c
Examining data/vkd3d-1.1/demos/demo_win32.h
Examining data/vkd3d-1.1/demos/demo_xcb.h
Examining data/vkd3d-1.1/include/vkd3d_dxgi1_2.h
Examining data/vkd3d-1.1/include/vkd3d_dxgiformat.h
Examining data/vkd3d-1.1/include/vkd3d_dxgi.h
Examining data/vkd3d-1.1/include/vkd3d_windows.h
Examining data/vkd3d-1.1/include/vkd3d_dxgibase.h
Examining data/vkd3d-1.1/include/vkd3d.h
Examining data/vkd3d-1.1/include/vkd3d_dxgi1_4.h
Examining data/vkd3d-1.1/include/vkd3d_d3dcommon.h
Examining data/vkd3d-1.1/include/vkd3d_d3d12.h
Examining data/vkd3d-1.1/include/private/vkd3d_debug.h
Examining data/vkd3d-1.1/include/private/list.h
Examining data/vkd3d-1.1/include/private/vkd3d_common.h
Examining data/vkd3d-1.1/include/private/vkd3d_shader.h
Examining data/vkd3d-1.1/include/private/rbtree.h
Examining data/vkd3d-1.1/include/private/vkd3d_memory.h
Examining data/vkd3d-1.1/include/private/vkd3d_test.h
Examining data/vkd3d-1.1/include/vkd3d_utils.h
Examining data/vkd3d-1.1/include/vkd3d_dxgitype.h
Examining data/vkd3d-1.1/include/vkd3d_dxgi1_3.h
Examining data/vkd3d-1.1/programs/vkd3d-compiler/main.c
Examining data/vkd3d-1.1/libs/vkd3d-shader/spirv.c
Examining data/vkd3d-1.1/libs/vkd3d-shader/dxbc.c
Examining data/vkd3d-1.1/libs/vkd3d-shader/vkd3d_shader_private.h
Examining data/vkd3d-1.1/libs/vkd3d-shader/vkd3d_shader_main.c
Examining data/vkd3d-1.1/libs/vkd3d-shader/trace.c
Examining data/vkd3d-1.1/libs/vkd3d/resource.c
Examining data/vkd3d-1.1/libs/vkd3d/vkd3d_main.c
Examining data/vkd3d-1.1/libs/vkd3d/command.c
Examining data/vkd3d-1.1/libs/vkd3d/utils.c
Examining data/vkd3d-1.1/libs/vkd3d/device.c
Examining data/vkd3d-1.1/libs/vkd3d/state.c
Examining data/vkd3d-1.1/libs/vkd3d/vulkan_procs.h
Examining data/vkd3d-1.1/libs/vkd3d/vkd3d_private.h
Examining data/vkd3d-1.1/libs/vkd3d-common/memory.c
Examining data/vkd3d-1.1/libs/vkd3d-common/debug.c
Examining data/vkd3d-1.1/libs/vkd3d_version.c
Examining data/vkd3d-1.1/libs/vkd3d-utils/vkd3d_utils_main.c
Examining data/vkd3d-1.1/libs/vkd3d-utils/vkd3d_utils_private.h
Examining data/vkd3d-1.1/tests/vkd3d_api.c
Examining data/vkd3d-1.1/tests/vkd3d_d3d12_test.h
Examining data/vkd3d-1.1/tests/d3d12.c

FINAL RESULTS:

data/vkd3d-1.1/include/private/vkd3d_common.h:35:61:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args)))
data/vkd3d-1.1/include/private/vkd3d_test.h:111: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/vkd3d-1.1/include/private/vkd3d_test.h:139: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/vkd3d-1.1/include/private/vkd3d_test.h:145: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/vkd3d-1.1/include/private/vkd3d_test.h:157:5:  [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/vkd3d-1.1/include/private/vkd3d_test.h:168:5:  [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/vkd3d-1.1/include/private/vkd3d_test.h:183:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        vsnprintf(buffer + size, sizeof(buffer) - size, fmt, args);
data/vkd3d-1.1/include/vkd3d_d3d12.h:4752:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        DWORD access,
data/vkd3d-1.1/include/vkd3d_d3d12.h:4763:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        DWORD access,
data/vkd3d-1.1/include/vkd3d_d3d12.h:5036:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        DWORD access,
data/vkd3d-1.1/include/vkd3d_d3d12.h:5049:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        DWORD access,
data/vkd3d-1.1/include/vkd3d_d3d12.h:5157:64:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define ID3D12Device_CreateSharedHandle(This,object,attributes,access,name,handle) (This)->lpVtbl->CreateSharedHandle(This,object,attributes,access,name,handle)
data/vkd3d-1.1/include/vkd3d_d3d12.h:5157:142:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define ID3D12Device_CreateSharedHandle(This,object,attributes,access,name,handle) (This)->lpVtbl->CreateSharedHandle(This,object,attributes,access,name,handle)
data/vkd3d-1.1/include/vkd3d_d3d12.h:5159:55:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define ID3D12Device_OpenSharedHandleByName(This,name,access,handle) (This)->lpVtbl->OpenSharedHandleByName(This,name,access,handle)
data/vkd3d-1.1/include/vkd3d_d3d12.h:5159:119:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define ID3D12Device_OpenSharedHandleByName(This,name,access,handle) (This)->lpVtbl->OpenSharedHandleByName(This,name,access,handle)
data/vkd3d-1.1/include/vkd3d_d3d12.h:5269:149:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
static FORCEINLINE HRESULT ID3D12Device_CreateSharedHandle(ID3D12Device* This,ID3D12DeviceChild *object,const SECURITY_ATTRIBUTES *attributes,DWORD access,const WCHAR *name,HANDLE *handle) {
data/vkd3d-1.1/include/vkd3d_d3d12.h:5270:68:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    return This->lpVtbl->CreateSharedHandle(This,object,attributes,access,name,handle);
data/vkd3d-1.1/include/vkd3d_d3d12.h:5275:107:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
static FORCEINLINE HRESULT ID3D12Device_OpenSharedHandleByName(ID3D12Device* This,const WCHAR *name,DWORD access,HANDLE *handle) {
data/vkd3d-1.1/include/vkd3d_d3d12.h:5276:59:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    return This->lpVtbl->OpenSharedHandleByName(This,name,access,handle);
data/vkd3d-1.1/libs/vkd3d-common/debug.c:77:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, args);
data/vkd3d-1.1/libs/vkd3d-common/debug.c:96: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, VKD3D_DEBUG_BUFFER_SIZE, fmt, args);
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:787: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(name, ARRAY_SIZE(name), fmt, args);
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:806: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(name, ARRAY_SIZE(name), fmt, args);
data/vkd3d-1.1/libs/vkd3d-shader/trace.c:358:10:  [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.
    rc = vsnprintf(&buffer->buffer[buffer->content_size], rem, format, args);
data/vkd3d-1.1/libs/vkd3d/device.c:2177:81:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        ID3D12DeviceChild *object, const SECURITY_ATTRIBUTES *attributes, DWORD access,
data/vkd3d-1.1/libs/vkd3d/device.c:2183:40:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            iface, object, attributes, access, debugstr_w(name, device->wchar_size), handle);
data/vkd3d-1.1/libs/vkd3d/device.c:2198:34:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        const WCHAR *name, DWORD access, HANDLE *handle)
data/vkd3d-1.1/libs/vkd3d/device.c:2203:58:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            iface, debugstr_w(name, device->wchar_size), access, handle);
data/vkd3d-1.1/libs/vkd3d/utils.c:334:41:  [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).
#define FLAG_TO_STR(f) if (flags & f) { strcat(buffer, " | "#f); flags &= ~f; }
data/vkd3d-1.1/libs/vkd3d/utils.c:353:41:  [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).
#define FLAG_TO_STR(f) if (flags & f) { strcat(buffer, " | "#f); flags &= ~f; }
data/vkd3d-1.1/libs/vkd3d/utils.c:369:41:  [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).
#define FLAG_TO_STR(f) if (flags & f) { strcat(buffer, " | "#f); flags &= ~f; }
data/vkd3d-1.1/include/private/vkd3d_test.h:198:31:  [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 char *debug_level = getenv("VKD3D_TEST_DEBUG");
data/vkd3d-1.1/include/private/vkd3d_test.h:199:27:  [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 *test_platform = getenv("VKD3D_TEST_PLATFORM");
data/vkd3d-1.1/libs/vkd3d-common/debug.c:49:25:  [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.
    if (!(vkd3d_debug = getenv("VKD3D_DEBUG")))
data/vkd3d-1.1/libs/vkd3d/device.c:75:33:  [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.
    if (!(disabled_extensions = getenv("VKD3D_DISABLE_EXTENSIONS")))
data/vkd3d-1.1/libs/vkd3d/state.c:1234:18:  [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.
    if (!(path = getenv("VKD3D_SHADER_DUMP_PATH")))
data/vkd3d-1.1/demos/demo_win32.h:62:18:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    title_size = MultiByteToWideChar(CP_UTF8, 0, title, -1, NULL, 0);
data/vkd3d-1.1/demos/demo_win32.h:68:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar(CP_UTF8, 0, title, -1, title_w, title_size);
data/vkd3d-1.1/demos/gears.c:615:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&vertices[vertex_idx], gears[i].vertices, gears[i].vertex_count * sizeof(*vertices));
data/vkd3d-1.1/demos/gears.c:623:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&faces[face_idx], gears[i].faces, tmp * sizeof(*faces));
data/vkd3d-1.1/demos/triangle.c:339: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(data, vertices, sizeof(vertices));
data/vkd3d-1.1/include/private/vkd3d_test.h:175: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[512];
data/vkd3d-1.1/include/private/vkd3d_test.h:202:55:  [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).
    vkd3d_test_state.debug_level = !debug_level ? 0 : atoi(debug_level);
data/vkd3d-1.1/include/vkd3d_windows.h:94:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char Data4[8];
data/vkd3d-1.1/include/vkd3d_windows.h:102:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char Data4[8];
data/vkd3d-1.1/libs/vkd3d-common/debug.c:83: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 buffers[VKD3D_DEBUG_BUFFER_COUNT][VKD3D_DEBUG_BUFFER_SIZE];
data/vkd3d-1.1/libs/vkd3d-common/debug.c:155: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(ptr, "%02x", c);
data/vkd3d-1.1/libs/vkd3d-common/debug.c:215: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(ptr, "%04x", c);
data/vkd3d-1.1/libs/vkd3d-common/debug.c:275: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(ptr, "%04x", c);
data/vkd3d-1.1/libs/vkd3d-shader/dxbc.c:553: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(priv->icb.data, tokens, sizeof(*tokens) * icb_size);
data/vkd3d-1.1/libs/vkd3d-shader/dxbc.c:1488:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(param->u.immconst_uint, *ptr, 1 * sizeof(DWORD));
data/vkd3d-1.1/libs/vkd3d-shader/dxbc.c:1499:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(param->u.immconst_uint, *ptr, VKD3D_VEC4_SIZE * sizeof(DWORD));
data/vkd3d-1.1/libs/vkd3d-shader/dxbc.c:1783: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(d, *ptr, sizeof(*d));
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:163: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(chunk->words, words, word_count * sizeof(*words));
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:198:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&dst_stream->words[dst_stream->word_count], &src_stream->words[src_location],
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:204:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&dst_stream->words[dst_stream->word_count], chunk->words,
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:210: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(&dst_stream->words[dst_stream->word_count], &src_stream->words[src_location],
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:423: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(d, declaration, sizeof(*d));
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:498: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(&declaration.parameters, operands, declaration.parameter_count * sizeof(*operands));
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:783: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[1024];
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:802: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[1024];
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:1623: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(code, stream.words, size);
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:1780: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.
    return memcpy(s, symbol, sizeof(*s));
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:2249: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 debug_name[256];
data/vkd3d-1.1/libs/vkd3d/command.c:4879: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((void *)object->desc.pArgumentDescs, desc->pArgumentDescs,
data/vkd3d-1.1/libs/vkd3d/state.c:1207: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 filename[1024];
data/vkd3d-1.1/libs/vkd3d/state.c:1211: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).
    if (!(f = fopen(filename, "wb")))
data/vkd3d-1.1/libs/vkd3d/utils.c:331: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[120];
data/vkd3d-1.1/libs/vkd3d/utils.c:350: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[50];
data/vkd3d-1.1/libs/vkd3d/utils.c:366: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[200];
data/vkd3d-1.1/programs/vkd3d-compiler/main.c:43:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(fd = fopen(filename, "rb")))
data/vkd3d-1.1/programs/vkd3d-compiler/main.c:73:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(fd = fopen(filename, "wb")))
data/vkd3d-1.1/tests/d3d12.c:407: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((BYTE *)ptr + offset, data, size);
data/vkd3d-1.1/tests/d3d12.c:444:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(dst_slice_ptr + y * dst->RowPitch, src_slice_ptr + y * src->RowPitch, row_size);
data/vkd3d-1.1/tests/d3d12.c:4304: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(ptr + vb_offset, quad, sizeof(quad));
data/vkd3d-1.1/tests/d3d12.c:4305: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(ptr + ib_offset, indices, sizeof(indices));
data/vkd3d-1.1/tests/d3d12.c:15930: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(id, rb.data, 64 * sizeof(*id));
data/vkd3d-1.1/tests/d3d12.c:15961: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(id, rb.data, 64 * sizeof(*id));
data/vkd3d-1.1/tests/vkd3d_api.c:220: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 *enabled_extensions[ARRAY_SIZE(extensions)];
data/vkd3d-1.1/tests/vkd3d_api.c:417: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 *enabled_extensions[ARRAY_SIZE(extensions)];
data/vkd3d-1.1/demos/demo_xcb.h:78:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cookie = xcb_intern_atom(c, 0, strlen(name), name);
data/vkd3d-1.1/demos/demo_xcb.h:179:33:  [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).
            XCB_ATOM_STRING, 8, strlen(title), title);
data/vkd3d-1.1/libs/vkd3d-shader/dxbc.c:1697:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ins->dst_count = strlen(opcode_info->dst_info);
data/vkd3d-1.1/libs/vkd3d-shader/dxbc.c:1699:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ins->src_count = strlen(opcode_info->src_info);
data/vkd3d-1.1/libs/vkd3d-shader/spirv.c:345:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return align(strlen(str) + 1, sizeof(uint32_t)) / sizeof(uint32_t);
data/vkd3d-1.1/libs/vkd3d-shader/trace.c:1625:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            q = p + strlen(p);
data/vkd3d-1.1/libs/vkd3d/device.c:80: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(extension_name);

ANALYSIS SUMMARY:

Hits = 87
Lines analyzed = 63728 in approximately 1.54 seconds (41299 lines/second)
Physical Source Lines of Code (SLOC) = 53364
Hits@level = [0]  40 [1]   7 [2]  44 [3]   5 [4]  31 [5]   0
Hits@level+ = [0+] 127 [1+]  87 [2+]  80 [3+]  36 [4+]  31 [5+]   0
Hits/KSLOC@level+ = [0+] 2.37988 [1+] 1.63031 [2+] 1.49914 [3+] 0.674612 [4+] 0.580916 [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.