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/libplacebo-2.72.2/demos/glfw.c Examining data/libplacebo-2.72.2/demos/sdl2.c Examining data/libplacebo-2.72.2/demos/video-filtering.c Examining data/libplacebo-2.72.2/src/colorspace.c Examining data/libplacebo-2.72.2/src/common.c Examining data/libplacebo-2.72.2/src/common.h Examining data/libplacebo-2.72.2/src/context.c Examining data/libplacebo-2.72.2/src/context.h Examining data/libplacebo-2.72.2/src/dispatch.c Examining data/libplacebo-2.72.2/src/dispatch.h Examining data/libplacebo-2.72.2/src/dither.c Examining data/libplacebo-2.72.2/src/dummy.c Examining data/libplacebo-2.72.2/src/filters.c Examining data/libplacebo-2.72.2/src/glsl/glslang.cc Examining data/libplacebo-2.72.2/src/glsl/glslang.h Examining data/libplacebo-2.72.2/src/gpu.c Examining data/libplacebo-2.72.2/src/gpu.h Examining data/libplacebo-2.72.2/src/include/dummy/libplacebo/config.h Examining data/libplacebo-2.72.2/src/include/libplacebo/colorspace.h Examining data/libplacebo-2.72.2/src/include/libplacebo/common.h Examining data/libplacebo-2.72.2/src/include/libplacebo/context.h Examining data/libplacebo-2.72.2/src/include/libplacebo/dispatch.h Examining data/libplacebo-2.72.2/src/include/libplacebo/dither.h Examining data/libplacebo-2.72.2/src/include/libplacebo/dummy.h Examining data/libplacebo-2.72.2/src/include/libplacebo/filters.h Examining data/libplacebo-2.72.2/src/include/libplacebo/gpu.h Examining data/libplacebo-2.72.2/src/include/libplacebo/opengl.h Examining data/libplacebo-2.72.2/src/include/libplacebo/renderer.h Examining data/libplacebo-2.72.2/src/include/libplacebo/shaders.h Examining data/libplacebo-2.72.2/src/include/libplacebo/shaders/av1.h Examining data/libplacebo-2.72.2/src/include/libplacebo/shaders/colorspace.h Examining data/libplacebo-2.72.2/src/include/libplacebo/shaders/custom.h Examining data/libplacebo-2.72.2/src/include/libplacebo/shaders/sampling.h Examining data/libplacebo-2.72.2/src/include/libplacebo/swapchain.h Examining data/libplacebo-2.72.2/src/include/libplacebo/utils/upload.h Examining data/libplacebo-2.72.2/src/include/libplacebo/vulkan.h Examining data/libplacebo-2.72.2/src/lcms.c Examining data/libplacebo-2.72.2/src/lcms.h Examining data/libplacebo-2.72.2/src/opengl/common.h Examining data/libplacebo-2.72.2/src/opengl/context.c Examining data/libplacebo-2.72.2/src/opengl/formats.c Examining data/libplacebo-2.72.2/src/opengl/formats.h Examining data/libplacebo-2.72.2/src/opengl/gpu.c Examining data/libplacebo-2.72.2/src/opengl/gpu.h Examining data/libplacebo-2.72.2/src/opengl/swapchain.c Examining data/libplacebo-2.72.2/src/opengl/utils.c Examining data/libplacebo-2.72.2/src/opengl/utils.h Examining data/libplacebo-2.72.2/src/pl_assert.h Examining data/libplacebo-2.72.2/src/renderer.c Examining data/libplacebo-2.72.2/src/shaders.c Examining data/libplacebo-2.72.2/src/shaders.h Examining data/libplacebo-2.72.2/src/shaders/av1.c Examining data/libplacebo-2.72.2/src/shaders/colorspace.c Examining data/libplacebo-2.72.2/src/shaders/custom.c Examining data/libplacebo-2.72.2/src/shaders/sampling.c Examining data/libplacebo-2.72.2/src/spirv.c Examining data/libplacebo-2.72.2/src/spirv.h Examining data/libplacebo-2.72.2/src/spirv_glslang.c Examining data/libplacebo-2.72.2/src/spirv_shaderc.c Examining data/libplacebo-2.72.2/src/swapchain.c Examining data/libplacebo-2.72.2/src/swapchain.h Examining data/libplacebo-2.72.2/src/tests/bench.c Examining data/libplacebo-2.72.2/src/tests/colorspace.c Examining data/libplacebo-2.72.2/src/tests/context.c Examining data/libplacebo-2.72.2/src/tests/dither.c Examining data/libplacebo-2.72.2/src/tests/dummy.c Examining data/libplacebo-2.72.2/src/tests/filters.c Examining data/libplacebo-2.72.2/src/tests/gpu_tests.h Examining data/libplacebo-2.72.2/src/tests/opengl_surfaceless.c Examining data/libplacebo-2.72.2/src/tests/tests.h Examining data/libplacebo-2.72.2/src/tests/utils.c Examining data/libplacebo-2.72.2/src/tests/vulkan.c Examining data/libplacebo-2.72.2/src/utils/upload.c Examining data/libplacebo-2.72.2/src/vulkan/command.c Examining data/libplacebo-2.72.2/src/vulkan/command.h Examining data/libplacebo-2.72.2/src/vulkan/common.h Examining data/libplacebo-2.72.2/src/vulkan/context.c Examining data/libplacebo-2.72.2/src/vulkan/formats.c Examining data/libplacebo-2.72.2/src/vulkan/formats.h Examining data/libplacebo-2.72.2/src/vulkan/gpu.c Examining data/libplacebo-2.72.2/src/vulkan/gpu.h Examining data/libplacebo-2.72.2/src/vulkan/malloc.c Examining data/libplacebo-2.72.2/src/vulkan/malloc.h Examining data/libplacebo-2.72.2/src/vulkan/swapchain.c Examining data/libplacebo-2.72.2/src/vulkan/utils.c Examining data/libplacebo-2.72.2/src/vulkan/utils.h Examining data/libplacebo-2.72.2/subprojects/bstr/bstr.c Examining data/libplacebo-2.72.2/subprojects/bstr/ctype.h Examining data/libplacebo-2.72.2/subprojects/bstr/format.c Examining data/libplacebo-2.72.2/subprojects/bstr/include/bstr.h Examining data/libplacebo-2.72.2/subprojects/bstr/osdep.h Examining data/libplacebo-2.72.2/subprojects/bstr/siphash.c Examining data/libplacebo-2.72.2/subprojects/bstr/siphash.h Examining data/libplacebo-2.72.2/subprojects/xtalloc/include/xtalloc.h Examining data/libplacebo-2.72.2/subprojects/xtalloc/ta.c Examining data/libplacebo-2.72.2/subprojects/xtalloc/ta.h Examining data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c Examining data/libplacebo-2.72.2/subprojects/xtalloc/xtalloc.c FINAL RESULTS: data/libplacebo-2.72.2/src/dispatch.c:462:65: [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 char *access = pl_desc_access_glsl_name(desc->access); data/libplacebo-2.72.2/src/dispatch.c:471: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. ADD(glsl, "%s restrict uniform %s %s;\n", access, types[dims], desc->name); data/libplacebo-2.72.2/src/dispatch.c:494:48: [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. pl_desc_access_glsl_name(desc->access), desc->name); data/libplacebo-2.72.2/src/dispatch.c:507:65: [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 char *access = pl_desc_access_glsl_name(desc->access); data/libplacebo-2.72.2/src/dispatch.c:513: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. ADD(glsl, "%s restrict uniform imageBuffer %s;\n", access, desc->name); data/libplacebo-2.72.2/src/include/libplacebo/gpu.h:834:25: [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. enum pl_desc_access access; data/libplacebo-2.72.2/src/include/libplacebo/vulkan.h:484:57: [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. VkImageLayout layout, VkAccessFlags access, data/libplacebo-2.72.2/src/include/libplacebo/vulkan.h:494:63: [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. VkImageLayout *layout, VkAccessFlags *access, data/libplacebo-2.72.2/src/include/libplacebo/vulkan.h:505:60: [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. VkImageLayout layout, VkAccessFlags access, data/libplacebo-2.72.2/src/opengl/gpu.c:1557:25: [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 const GLenum access[] = { data/libplacebo-2.72.2/src/opengl/gpu.c:1575:28: [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. access[desc->access], tex_gl->iformat); data/libplacebo-2.72.2/src/opengl/gpu.c:1575:41: [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. access[desc->access], tex_gl->iformat); data/libplacebo-2.72.2/src/opengl/gpu.c:1615:19: [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. if (desc->access != PL_DESC_ACCESS_READONLY) data/libplacebo-2.72.2/src/opengl/gpu.c:1624:56: [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. if (desc->type == PL_DESC_BUF_STORAGE && desc->access != PL_DESC_ACCESS_READONLY) data/libplacebo-2.72.2/src/vulkan/gpu.c:1231:57: [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. VkImageLayout layout, VkAccessFlags access, data/libplacebo-2.72.2/src/vulkan/gpu.c:1253:17: [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. access, layout, false); data/libplacebo-2.72.2/src/vulkan/gpu.c:1265:63: [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. VkImageLayout *layout, VkAccessFlags *access, data/libplacebo-2.72.2/src/vulkan/gpu.c:1286:60: [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. VkImageLayout layout, VkAccessFlags access, data/libplacebo-2.72.2/src/vulkan/gpu.c:1298:30: [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. tex_vk->current_access = access; data/libplacebo-2.72.2/src/vulkan/gpu.c:2606:19: [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. switch (desc->access) { data/libplacebo-2.72.2/src/vulkan/gpu.c:2638:67: [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. tex_barrier(gpu, cmd, tex, passStages[pass->params.type], access, data/libplacebo-2.72.2/src/vulkan/gpu.c:2656:21: [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. access, 0, buf->params.size, false); data/libplacebo-2.72.2/src/vulkan/gpu.c:2674:21: [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. access, 0, buf->params.size, false); data/libplacebo-2.72.2/src/vulkan/gpu.c:2696:19: [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. if (desc->access != PL_DESC_ACCESS_READONLY) data/libplacebo-2.72.2/subprojects/bstr/bstr.c:265:15: [4] (buffer) vsscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. int ret = vsscanf(ptr, format, va); data/libplacebo-2.72.2/subprojects/bstr/bstr.c:318:12: [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. size = vsnprintf(dest, MAX(avail, 1), fmt, copy); data/libplacebo-2.72.2/subprojects/bstr/bstr.c:326: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(s->start + s->len, size + 1, fmt, ap); data/libplacebo-2.72.2/subprojects/bstr/osdep.h:7:57: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format(printf, a1, a2))) data/libplacebo-2.72.2/subprojects/xtalloc/ta.h:24:47: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define TA_PRF(a1, a2) __attribute__ ((format(printf, a1, a2))) data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:196:12: [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. size = vsnprintf(&c, 1, fmt, copy); data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:208: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(*str + at, size + 1, fmt, ap); data/libplacebo-2.72.2/src/context.c:41: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 *enable_leak = getenv("LIBPLACEBO_LEAK_REPORT"); data/libplacebo-2.72.2/src/shaders/custom.c:995:22: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. .data = &random, data/libplacebo-2.72.2/demos/sdl2.c:59:10: [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). fp = fopen(path, "rb"); data/libplacebo-2.72.2/demos/video-filtering.c:517: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(&e->image, img, sizeof(struct image)); data/libplacebo-2.72.2/src/dispatch.c:346: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 loc[32]; data/libplacebo-2.72.2/src/dispatch.c:426:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char prefixes[PL_FMT_TYPE_COUNT] = { data/libplacebo-2.72.2/src/dispatch.c:739: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(pv->cached_data, sv->data, host_layout.size); data/libplacebo-2.72.2/src/dispatch.c:792: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 name[4]; data/libplacebo-2.72.2/src/dispatch.c:980: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((void *) (va_base + n * stride), sva->data[n], size); data/libplacebo-2.72.2/src/dummy.c:174:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->data, params->initial_data, params->size); data/libplacebo-2.72.2/src/dummy.c:199: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[buf_offset], data, size); data/libplacebo-2.72.2/src/dummy.c:207: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(dest, &src[buf_offset], size); data/libplacebo-2.72.2/src/dummy.c:239:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->data, params->initial_data, tex_size(gpu, tex)); data/libplacebo-2.72.2/src/dummy.c:303: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[dst_row + pos], &src[src_row + pos], row_size); data/libplacebo-2.72.2/src/dummy.c:333: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[dst_row + pos], &src[src_row + pos], row_size); data/libplacebo-2.72.2/src/gpu.c:209:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char idx_map[4] = {'R', 'G', 'B', 'A'}; data/libplacebo-2.72.2/src/gpu.c:210: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 indices[4] = {' ', ' ', ' ', ' '}; data/libplacebo-2.72.2/src/gpu.c:844:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *types[PL_VAR_TYPE_COUNT][MAX_DIM+1][MAX_DIM+1] = { data/libplacebo-2.72.2/src/gpu.c:985: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((void *) dst, (const void *) src, src_layout.size); data/libplacebo-2.72.2/src/gpu.c:993: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((void *) dst, (const void *) src, stride); data/libplacebo-2.72.2/src/gpu.c:1572:7: [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 *print_uuid(char buf[3 * UUID_SIZE], const uint8_t uuid[UUID_SIZE]) data/libplacebo-2.72.2/src/gpu.c:1572:24: [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 *print_uuid(char buf[3 * UUID_SIZE], const uint8_t uuid[UUID_SIZE]) data/libplacebo-2.72.2/src/gpu.h:142:7: [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 *print_uuid(char buf[3 * UUID_SIZE], const uint8_t uuid[UUID_SIZE]); data/libplacebo-2.72.2/src/gpu.h:142:24: [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 *print_uuid(char buf[3 * UUID_SIZE], const uint8_t uuid[UUID_SIZE]); data/libplacebo-2.72.2/src/opengl/gpu.c:966: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(buf->data + offset, data, size); data/libplacebo-2.72.2/src/opengl/gpu.c:980: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(dest, buf->data + offset, size); data/libplacebo-2.72.2/src/opengl/gpu.c:1200:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char gl_cache_magic[4] = CACHE_MAGIC; data/libplacebo-2.72.2/src/opengl/gpu.c:1203: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 magic[sizeof(gl_cache_magic)]; data/libplacebo-2.72.2/src/shaders/sampling.c:368: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, filt->weights, w * sizeof(float)); data/libplacebo-2.72.2/src/shaders/sampling.c:582: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, filt->weights, w * h * 4 * sizeof(float)); data/libplacebo-2.72.2/src/spirv.h:32: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[SPIRV_NAME_MAX_LEN]; // for cache invalidation data/libplacebo-2.72.2/src/vulkan/context.c:319: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[64]; data/libplacebo-2.72.2/src/vulkan/context.c:1291: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(dparams.device_uuid, params->device_uuid, VK_UUID_SIZE); data/libplacebo-2.72.2/src/vulkan/gpu.c:1515: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((void *) addr, data, size); data/libplacebo-2.72.2/src/vulkan/gpu.c:1551: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(tail, data, size_rem); data/libplacebo-2.72.2/src/vulkan/gpu.c:1570: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(dest, (void *) addr, size); data/libplacebo-2.72.2/src/vulkan/gpu.c:2111:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char vk_cache_magic[4] = CACHE_MAGIC; data/libplacebo-2.72.2/src/vulkan/gpu.c:2114: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 magic[sizeof(vk_cache_magic)]; data/libplacebo-2.72.2/src/vulkan/gpu.c:2116: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 compiler[SPIRV_NAME_MAX_LEN]; data/libplacebo-2.72.2/subprojects/bstr/bstr.c:171: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[51]; data/libplacebo-2.72.2/subprojects/bstr/bstr.c:173: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(buf, str.start, len); data/libplacebo-2.72.2/subprojects/bstr/bstr.c:185: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[101]; data/libplacebo-2.72.2/subprojects/bstr/bstr.c:187: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(buf, str.start, len); data/libplacebo-2.72.2/subprojects/bstr/bstr.c:293: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(s->start + s->len, append.start, append.len); data/libplacebo-2.72.2/subprojects/bstr/format.c:52: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[32]; data/libplacebo-2.72.2/subprojects/bstr/format.c:126:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char ccStrPrintDecimalTable[201] = data/libplacebo-2.72.2/subprojects/xtalloc/ta.c: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 align_min[(sizeof(struct xta_header) + MIN_ALIGN - 1) & ~(MIN_ALIGN - 1)]; data/libplacebo-2.72.2/subprojects/xtalloc/ta.c:383: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 name[256] = {0}; data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:86: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(res, ptr, size); data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:113: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(*str + at, append, append_len); data/libplacebo-2.72.2/src/spirv.c:47:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(spirv->name, impl->name, sizeof(spirv->name) - 1); data/libplacebo-2.72.2/src/spirv_shaderc.c:88:69: [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 shaderc_compile_into_spv_assembly(p->compiler, glsl, strlen(glsl), data/libplacebo-2.72.2/src/spirv_shaderc.c:91:60: [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 shaderc_compile_into_spv(p->compiler, glsl, strlen(glsl), data/libplacebo-2.72.2/src/tests/gpu_tests.h:764:41: [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). strlen(user_shader_tests[i])); data/libplacebo-2.72.2/subprojects/bstr/include/bstr.h:62:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return (struct bstr){(unsigned char *)s, s ? strlen(s) : 0}; data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:127:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return xta_strndup(xta_parent, str, str ? strlen(str) : 0); data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:154:42: [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 strndup_append_at(str, *str ? strlen(*str) : 0, a, (size_t)-1); data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:173:42: [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 strndup_append_at(str, *str ? strlen(*str) : 0, a, n); data/libplacebo-2.72.2/subprojects/xtalloc/ta_utils.c:255:48: [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 xta_vasprintf_append_at(str, *str ? strlen(*str) : 0, fmt, ap); ANALYSIS SUMMARY: Hits = 90 Lines analyzed = 36405 in approximately 0.91 seconds (39886 lines/second) Physical Source Lines of Code (SLOC) = 25104 Hits@level = [0] 109 [1] 9 [2] 48 [3] 2 [4] 31 [5] 0 Hits@level+ = [0+] 199 [1+] 90 [2+] 81 [3+] 33 [4+] 31 [5+] 0 Hits/KSLOC@level+ = [0+] 7.92702 [1+] 3.58509 [2+] 3.22658 [3+] 1.31453 [4+] 1.23486 [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.