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/glfw3-3.3.2/deps/getopt.c Examining data/glfw3-3.3.2/deps/getopt.h Examining data/glfw3-3.3.2/deps/glad/gl.h Examining data/glfw3-3.3.2/deps/glad/khrplatform.h Examining data/glfw3-3.3.2/deps/glad/vk_platform.h Examining data/glfw3-3.3.2/deps/glad/vulkan.h Examining data/glfw3-3.3.2/deps/glad_gl.c Examining data/glfw3-3.3.2/deps/glad_vulkan.c Examining data/glfw3-3.3.2/deps/linmath.h Examining data/glfw3-3.3.2/deps/mingw/_mingw_dxhelper.h Examining data/glfw3-3.3.2/deps/mingw/dinput.h Examining data/glfw3-3.3.2/deps/mingw/xinput.h Examining data/glfw3-3.3.2/deps/nuklear.h Examining data/glfw3-3.3.2/deps/nuklear_glfw_gl2.h Examining data/glfw3-3.3.2/deps/stb_image_write.h Examining data/glfw3-3.3.2/deps/tinycthread.c Examining data/glfw3-3.3.2/deps/tinycthread.h Examining data/glfw3-3.3.2/deps/vs2008/stdint.h Examining data/glfw3-3.3.2/examples/boing.c Examining data/glfw3-3.3.2/examples/gears.c Examining data/glfw3-3.3.2/examples/heightmap.c Examining data/glfw3-3.3.2/examples/offscreen.c Examining data/glfw3-3.3.2/examples/particles.c Examining data/glfw3-3.3.2/examples/sharing.c Examining data/glfw3-3.3.2/examples/simple.c Examining data/glfw3-3.3.2/examples/splitview.c Examining data/glfw3-3.3.2/examples/wave.c Examining data/glfw3-3.3.2/include/GLFW/glfw3.h Examining data/glfw3-3.3.2/include/GLFW/glfw3native.h Examining data/glfw3-3.3.2/src/cocoa_joystick.h Examining data/glfw3-3.3.2/src/cocoa_platform.h Examining data/glfw3-3.3.2/src/cocoa_time.c Examining data/glfw3-3.3.2/src/context.c Examining data/glfw3-3.3.2/src/egl_context.c Examining data/glfw3-3.3.2/src/egl_context.h Examining data/glfw3-3.3.2/src/glx_context.c Examining data/glfw3-3.3.2/src/glx_context.h Examining data/glfw3-3.3.2/src/init.c Examining data/glfw3-3.3.2/src/input.c Examining data/glfw3-3.3.2/src/internal.h Examining data/glfw3-3.3.2/src/linux_joystick.c Examining data/glfw3-3.3.2/src/linux_joystick.h Examining data/glfw3-3.3.2/src/mappings.h Examining data/glfw3-3.3.2/src/monitor.c Examining data/glfw3-3.3.2/src/nsgl_context.h Examining data/glfw3-3.3.2/src/null_init.c Examining data/glfw3-3.3.2/src/null_joystick.c Examining data/glfw3-3.3.2/src/null_joystick.h Examining data/glfw3-3.3.2/src/null_monitor.c Examining data/glfw3-3.3.2/src/null_platform.h Examining data/glfw3-3.3.2/src/null_window.c Examining data/glfw3-3.3.2/src/osmesa_context.c Examining data/glfw3-3.3.2/src/osmesa_context.h Examining data/glfw3-3.3.2/src/posix_thread.c Examining data/glfw3-3.3.2/src/posix_thread.h Examining data/glfw3-3.3.2/src/posix_time.c Examining data/glfw3-3.3.2/src/posix_time.h Examining data/glfw3-3.3.2/src/vulkan.c Examining data/glfw3-3.3.2/src/wgl_context.c Examining data/glfw3-3.3.2/src/wgl_context.h Examining data/glfw3-3.3.2/src/win32_init.c Examining data/glfw3-3.3.2/src/win32_joystick.c Examining data/glfw3-3.3.2/src/win32_joystick.h Examining data/glfw3-3.3.2/src/win32_monitor.c Examining data/glfw3-3.3.2/src/win32_platform.h Examining data/glfw3-3.3.2/src/win32_thread.c Examining data/glfw3-3.3.2/src/win32_time.c Examining data/glfw3-3.3.2/src/win32_window.c Examining data/glfw3-3.3.2/src/window.c Examining data/glfw3-3.3.2/src/wl_init.c Examining data/glfw3-3.3.2/src/wl_monitor.c Examining data/glfw3-3.3.2/src/wl_platform.h Examining data/glfw3-3.3.2/src/wl_window.c Examining data/glfw3-3.3.2/src/x11_init.c Examining data/glfw3-3.3.2/src/x11_monitor.c Examining data/glfw3-3.3.2/src/x11_platform.h Examining data/glfw3-3.3.2/src/x11_window.c Examining data/glfw3-3.3.2/src/xkb_unicode.c Examining data/glfw3-3.3.2/src/xkb_unicode.h Examining data/glfw3-3.3.2/tests/clipboard.c Examining data/glfw3-3.3.2/tests/cursor.c Examining data/glfw3-3.3.2/tests/empty.c Examining data/glfw3-3.3.2/tests/events.c Examining data/glfw3-3.3.2/tests/gamma.c Examining data/glfw3-3.3.2/tests/glfwinfo.c Examining data/glfw3-3.3.2/tests/icon.c Examining data/glfw3-3.3.2/tests/iconify.c Examining data/glfw3-3.3.2/tests/inputlag.c Examining data/glfw3-3.3.2/tests/joysticks.c Examining data/glfw3-3.3.2/tests/monitors.c Examining data/glfw3-3.3.2/tests/msaa.c Examining data/glfw3-3.3.2/tests/opacity.c Examining data/glfw3-3.3.2/tests/reopen.c Examining data/glfw3-3.3.2/tests/tearing.c Examining data/glfw3-3.3.2/tests/threads.c Examining data/glfw3-3.3.2/tests/timeout.c Examining data/glfw3-3.3.2/tests/title.c Examining data/glfw3-3.3.2/tests/triangle-vulkan.c Examining data/glfw3-3.3.2/tests/windows.c Examining data/glfw3-3.3.2/debian/tests/glfw3_test.c FINAL RESULTS: data/glfw3-3.3.2/deps/glad/gl.h:1905:77: [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. typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); data/glfw3-3.3.2/deps/glad/gl.h:1906:126: [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. typedef void * (GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); data/glfw3-3.3.2/deps/glad_gl.c:12:31: [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. #define GLAD_IMPL_UTIL_SSCANF sscanf data/glfw3-3.3.2/deps/glad_vulkan.c:12:31: [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. #define GLAD_IMPL_UTIL_SSCANF sscanf data/glfw3-3.3.2/deps/nuklear.h:5670:37: [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. #define NK_VSNPRINTF(s,n,f,a) vsnprintf(s,n,f,a) data/glfw3-3.3.2/deps/nuklear.h:5672:35: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. #define NK_VSNPRINTF(s,n,f,a) vsprintf(s,f,a) data/glfw3-3.3.2/src/init.c:120: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(result, source); data/glfw3-3.3.2/src/init.c:165: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(description, sizeof(description), format, vl); data/glfw3-3.3.2/src/init.c:213: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(error->description, description); data/glfw3-3.3.2/src/internal.h:736:27: [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. __attribute__((format(printf, 2, 3))); data/glfw3-3.3.2/src/win32_monitor.c:104:5: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(monitor->win32.adapterName, adapter->DeviceName); data/glfw3-3.3.2/src/win32_monitor.c:113:9: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(monitor->win32.displayName, display->DeviceName); data/glfw3-3.3.2/src/wl_window.c:174: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(name, path); data/glfw3-3.3.2/src/wl_window.c:175: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(name, template); data/glfw3-3.3.2/src/x11_window.c:1063:21: [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(string, data); data/glfw3-3.3.2/tests/triangle-vulkan.c:63:9: [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(err_msg); \ data/glfw3-3.3.2/tests/triangle-vulkan.c:342:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(message, "ERROR: [%s] Code %d : %s", pLayerPrefix, msgCode, data/glfw3-3.3.2/tests/triangle-vulkan.c:345:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(message, "WARNING: [%s] Code %d : %s", pLayerPrefix, msgCode, data/glfw3-3.3.2/deps/getopt.c:52:5: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt(int argc, char* const argv[], const char* optstring) { data/glfw3-3.3.2/deps/getopt.c:158:5: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt_long(int argc, char* const argv[], const char* optstring, data/glfw3-3.3.2/deps/getopt.c:174:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. return getopt(argc, argv, optstring); data/glfw3-3.3.2/deps/getopt.h:48:5: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt(int argc, char* const argv[], const char* optstring); data/glfw3-3.3.2/deps/getopt.h:50:5: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt_long(int argc, char* const argv[], data/glfw3-3.3.2/deps/tinycthread.c:61:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&mtx->mHandle); data/glfw3-3.3.2/deps/tinycthread.c:89:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&mtx->mHandle); data/glfw3-3.3.2/deps/tinycthread.c:146:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&cond->mWaitersCountLock); data/glfw3-3.3.2/deps/tinycthread.c:192:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&cond->mWaitersCountLock); data/glfw3-3.3.2/deps/tinycthread.c:217:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&cond->mWaitersCountLock); data/glfw3-3.3.2/deps/tinycthread.c:242:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&cond->mWaitersCountLock); data/glfw3-3.3.2/deps/tinycthread.c:263:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&cond->mWaitersCountLock); data/glfw3-3.3.2/examples/particles.c:955:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "fh")) != -1) data/glfw3-3.3.2/examples/sharing.c:119:9: [3] (random) srand: 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. srand((unsigned int) glfwGetTimerValue()); data/glfw3-3.3.2/src/win32_thread.c:77:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&mutex->win32.section); data/glfw3-3.3.2/src/win32_thread.c:91:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&mutex->win32.section); data/glfw3-3.3.2/src/wl_init.c:418:14: [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. locale = getenv("LC_ALL"); data/glfw3-3.3.2/src/wl_init.c:420: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. locale = getenv("LC_CTYPE"); data/glfw3-3.3.2/src/wl_init.c:422: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. locale = getenv("LANG"); data/glfw3-3.3.2/src/wl_init.c:1173:23: [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. cursorTheme = getenv("XCURSOR_THEME"); data/glfw3-3.3.2/src/wl_init.c:1174: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. cursorSizeStr = getenv("XCURSOR_SIZE"); data/glfw3-3.3.2/src/wl_window.c:166: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. path = getenv("XDG_RUNTIME_DIR"); data/glfw3-3.3.2/src/x11_init.c:950: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* display = getenv("DISPLAY"); data/glfw3-3.3.2/src/x11_window.c:745:40: [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* resourceName = getenv("RESOURCE_NAME"); data/glfw3-3.3.2/tests/clipboard.c:95:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "h")) != -1) data/glfw3-3.3.2/tests/empty.c:80:5: [3] (random) srand: 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. srand((unsigned int) time(NULL)); data/glfw3-3.3.2/tests/events.c:530:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "hfn:")) != -1) data/glfw3-3.3.2/tests/glfwinfo.c:416:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, "a:b:c:dfhlm:n:p:s:v", options, NULL)) != -1) data/glfw3-3.3.2/tests/iconify.c:206:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "afhn")) != -1) data/glfw3-3.3.2/tests/inputlag.c:166:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "fh")) != -1) data/glfw3-3.3.2/tests/monitors.c:226:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "th")) != -1) data/glfw3-3.3.2/tests/msaa.c:105:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "hs:")) != -1) data/glfw3-3.3.2/tests/reopen.c:107:5: [3] (random) srand: 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. srand((unsigned int) time(NULL)); data/glfw3-3.3.2/tests/timeout.c:59:5: [3] (random) srand: 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. srand((unsigned int) time(NULL)); data/glfw3-3.3.2/tests/windows.c:101:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "bfh")) != -1) data/glfw3-3.3.2/deps/glad/vulkan.h:1381: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 extensionName [ VK_MAX_EXTENSION_NAME_SIZE ]; data/glfw3-3.3.2/deps/glad/vulkan.h: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 layerName [ VK_MAX_EXTENSION_NAME_SIZE ]; data/glfw3-3.3.2/deps/glad/vulkan.h:1388: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 description [ VK_MAX_DESCRIPTION_SIZE ]; data/glfw3-3.3.2/deps/glad/vulkan.h:2873: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 deviceName [ VK_MAX_PHYSICAL_DEVICE_NAME_SIZE ]; data/glfw3-3.3.2/deps/glad_gl.c:1642: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(local_str, gl_str_tmp, len * sizeof(char)); data/glfw3-3.3.2/deps/glad_vulkan.c:462: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(extensions[i], ext.extensionName, extension_name_length * sizeof(char)); data/glfw3-3.3.2/deps/glad_vulkan.c:480: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(extensions[instance_extension_count + i], ext.extensionName, extension_name_length * sizeof(char)); data/glfw3-3.3.2/deps/nuklear.h:288:41: [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. #define NK_STATIC_ASSERT(exp) typedef char NK_UNIQUE_NAME(_dummy_array)[(exp)?1:-1] data/glfw3-3.3.2/deps/nuklear.h:461: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. typedef char nk_glyph[NK_UTF_SIZE]; data/glfw3-3.3.2/deps/nuklear.h:3893: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 padding[3]; data/glfw3-3.3.2/deps/nuklear.h:4480: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 string[1]; data/glfw3-3.3.2/deps/nuklear.h:4547: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 text[NK_INPUT_MAX]; data/glfw3-3.3.2/deps/nuklear.h:5319: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[NK_MAX_NUMBER_BUFFER]; data/glfw3-3.3.2/deps/nuklear.h:5333: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_string[NK_WINDOW_MAX_NAME]; data/glfw3-3.3.2/deps/nuklear.h:6830: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 number_buffer[NK_MAX_NUMBER_BUFFER]; data/glfw3-3.3.2/deps/nuklear.h:7221: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). fd = fopen(path, "rb"); data/glfw3-3.3.2/deps/nuklear.h:12221: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 buffer[NK_TT_MAX_OVERSAMPLE]; data/glfw3-3.3.2/deps/nuklear.h:12284: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 buffer[NK_TT_MAX_OVERSAMPLE]; data/glfw3-3.3.2/deps/nuklear.h:13053: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. NK_GLOBAL const char nk_proggy_clean_ttf_compressed_data_base85[11980+1] = data/glfw3-3.3.2/deps/nuklear.h:13145: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. NK_GLOBAL const char nk_custom_cursor_data[NK_CURSOR_DATA_W * NK_CURSOR_DATA_H + 1] = data/glfw3-3.3.2/deps/nuklear.h:14143: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. NK_GLOBAL const char *nk_color_names[NK_COLOR_COUNT] = { data/glfw3-3.3.2/deps/nuklear.h:19207: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/glfw3-3.3.2/deps/nuklear.h:19216: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/glfw3-3.3.2/deps/nuklear.h:19224: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/glfw3-3.3.2/deps/nuklear.h:19232: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/glfw3-3.3.2/deps/nuklear.h:19273: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 hex[16]; data/glfw3-3.3.2/deps/nuklear.h:23414: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 string[NK_MAX_NUMBER_BUFFER]; data/glfw3-3.3.2/deps/nuklear.h:23628: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 dummy_buffer[NK_MAX_NUMBER_BUFFER]; data/glfw3-3.3.2/deps/nuklear.h:25182: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/glfw3-3.3.2/deps/stb_image_write.h:222:14: [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(filename, "wb"); data/glfw3-3.3.2/deps/stb_image_write.h:252:31: [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 b[2]; data/glfw3-3.3.2/deps/stb_image_write.h:258:31: [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 b[4]; data/glfw3-3.3.2/deps/stb_image_write.h:282: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. unsigned char arr[3]; data/glfw3-3.3.2/deps/stb_image_write.h:289: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. unsigned char bg[3] = { 255, 0, 255}, px[3]; data/glfw3-3.3.2/deps/stb_image_write.h:517: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. unsigned char scanlineheader[4] = { 2, 2, 0, 0 }; data/glfw3-3.3.2/deps/stb_image_write.h:518: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. unsigned char rgbe[4]; data/glfw3-3.3.2/deps/stb_image_write.h:612: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. char buffer[128]; data/glfw3-3.3.2/deps/stb_image_write.h:616: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. len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); data/glfw3-3.3.2/deps/stb_image_write.h:902: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. unsigned char sig[8] = { 137,80,78,71,13,10,26,10 }; data/glfw3-3.3.2/deps/stb_image_write.h:998:8: [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). f = fopen(filename, "wb"); data/glfw3-3.3.2/examples/heightmap.c:128: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 info_log[8192]; data/glfw3-3.3.2/examples/heightmap.c:157: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 info_log[8192]; data/glfw3-3.3.2/examples/particles.c:114:16: [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 unsigned char particle_texture[ P_TEX_WIDTH * P_TEX_HEIGHT ] = { data/glfw3-3.3.2/examples/particles.c:126:16: [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 unsigned char floor_texture[ F_TEX_WIDTH * F_TEX_HEIGHT ] = { data/glfw3-3.3.2/examples/sharing.c:113: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 pixels[16 * 16]; data/glfw3-3.3.2/include/GLFW/glfw3.h:1721: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 buttons[15]; data/glfw3-3.3.2/src/cocoa_platform.h:153: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 keynames[GLFW_KEY_LAST + 1][17]; data/glfw3-3.3.2/src/init.c:158: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 description[_GLFW_MESSAGE_SIZE]; data/glfw3-3.3.2/src/init.c:173: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(description, "The GLFW library is not initialized"); data/glfw3-3.3.2/src/init.c:175: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(description, "There is no current context"); data/glfw3-3.3.2/src/init.c:177: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(description, "Invalid argument for enum parameter"); data/glfw3-3.3.2/src/init.c:179: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(description, "Invalid value for parameter"); data/glfw3-3.3.2/src/init.c:181: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(description, "Out of memory"); data/glfw3-3.3.2/src/init.c:183: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(description, "The requested API is unavailable"); data/glfw3-3.3.2/src/init.c:185: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(description, "The requested API version is unavailable"); data/glfw3-3.3.2/src/init.c:187: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(description, "A platform-specific error occurred"); data/glfw3-3.3.2/src/init.c:189: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(description, "The requested format is unavailable"); data/glfw3-3.3.2/src/init.c:191: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(description, "The specified window has no context"); data/glfw3-3.3.2/src/init.c:193: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(description, "ERROR: UNKNOWN GLFW ERROR"); data/glfw3-3.3.2/src/input.c:156: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(mapping->guid, c, length); data/glfw3-3.3.2/src/input.c:166: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(mapping->name, c, length); data/glfw3-3.3.2/src/input.c:1130: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 line[1024]; data/glfw3-3.3.2/src/input.c:1137: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(line, c, length); data/glfw3-3.3.2/src/internal.h:167: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 extensionName[256]; data/glfw3-3.3.2/src/internal.h:233: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 description[_GLFW_MESSAGE_SIZE]; data/glfw3-3.3.2/src/internal.h:272: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 frameName[256]; data/glfw3-3.3.2/src/internal.h:275: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 className[256]; data/glfw3-3.3.2/src/internal.h:276: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 instanceName[256]; data/glfw3-3.3.2/src/internal.h:390: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 mouseButtons[GLFW_MOUSE_BUTTON_LAST + 1]; data/glfw3-3.3.2/src/internal.h:391: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 keys[GLFW_KEY_LAST + 1]; data/glfw3-3.3.2/src/internal.h:470: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/glfw3-3.3.2/src/internal.h: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 guid[33]; data/glfw3-3.3.2/src/internal.h:489: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 guid[33]; data/glfw3-3.3.2/src/linux_joystick.c:65: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 stateMap[3][3] = data/glfw3-3.3.2/src/linux_joystick.c:138: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). linjs.fd = open(path, O_RDONLY | O_NONBLOCK); data/glfw3-3.3.2/src/linux_joystick.c:142: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 evBits[(EV_CNT + 7) / 8] = {0}; data/glfw3-3.3.2/src/linux_joystick.c: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 keyBits[(KEY_CNT + 7) / 8] = {0}; data/glfw3-3.3.2/src/linux_joystick.c:144: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 absBits[(ABS_CNT + 7) / 8] = {0}; data/glfw3-3.3.2/src/linux_joystick.c:166: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[256] = ""; data/glfw3-3.3.2/src/linux_joystick.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 guid[33] = ""; data/glfw3-3.3.2/src/linux_joystick.c:176: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(guid, "%02x%02x0000%02x%02x0000%02x%02x0000%02x%02x0000", data/glfw3-3.3.2/src/linux_joystick.c:184: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(guid, "%02x%02x0000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00", data/glfw3-3.3.2/src/linux_joystick.c:234: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(&js->linjs, &linjs, sizeof(linjs)); data/glfw3-3.3.2/src/linux_joystick.c:306: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 path[PATH_MAX]; data/glfw3-3.3.2/src/linux_joystick.c:353: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[16384]; data/glfw3-3.3.2/src/linux_joystick.c:366: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[PATH_MAX]; data/glfw3-3.3.2/src/linux_joystick.h:41: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[PATH_MAX]; data/glfw3-3.3.2/src/win32_init.c:394:13: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). count = MultiByteToWideChar(CP_UTF8, 0, source, -1, NULL, 0); data/glfw3-3.3.2/src/win32_init.c:404:10: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (!MultiByteToWideChar(CP_UTF8, 0, source, -1, target, count)) data/glfw3-3.3.2/src/win32_init.c:448: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 message[_GLFW_MESSAGE_SIZE] = ""; data/glfw3-3.3.2/src/win32_joystick.c:213: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 name[256]; data/glfw3-3.3.2/src/win32_joystick.c:354: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 guid[33]; data/glfw3-3.3.2/src/win32_joystick.c:355: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[256]; data/glfw3-3.3.2/src/win32_joystick.c:455: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(guid, "03000000%02x%02x0000%02x%02x000000000000", data/glfw3-3.3.2/src/win32_joystick.c:463: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(guid, "05000000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00", data/glfw3-3.3.2/src/win32_joystick.c:538: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 guid[33]; data/glfw3-3.3.2/src/win32_joystick.c:559: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(guid, "78696e707574%02x000000000000000000", data/glfw3-3.3.2/src/win32_joystick.c:749: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 original[33]; data/glfw3-3.3.2/src/win32_joystick.c:751: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(guid, "03000000%.4s0000%.4s000000000000", data/glfw3-3.3.2/src/win32_monitor.c:149: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(disconnected, data/glfw3-3.3.2/src/win32_monitor.c:489: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(ramp->red, values[0], sizeof(values[0])); data/glfw3-3.3.2/src/win32_monitor.c:490: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(ramp->green, values[1], sizeof(values[1])); data/glfw3-3.3.2/src/win32_monitor.c:491: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(ramp->blue, values[2], sizeof(values[2])); data/glfw3-3.3.2/src/win32_platform.h:335: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 keynames[GLFW_KEY_LAST + 1][5]; data/glfw3-3.3.2/src/win32_platform.h:399: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 publicAdapterName[32]; data/glfw3-3.3.2/src/win32_platform.h:400: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 publicDisplayName[32]; data/glfw3-3.3.2/src/win32_window.c:2096:22: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). characterCount = MultiByteToWideChar(CP_UTF8, 0, string, -1, NULL, 0); data/glfw3-3.3.2/src/win32_window.c:2117:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, string, -1, buffer, characterCount); data/glfw3-3.3.2/src/wl_monitor.c:50: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/glfw3-3.3.2/src/x11_init.c:245: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 name[XkbKeyNameLength + 1]; data/glfw3-3.3.2/src/x11_init.c:252: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(name, desc->names->keys[scancode].name, XkbKeyNameLength); data/glfw3-3.3.2/src/x11_init.c:781: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 name[32]; data/glfw3-3.3.2/src/x11_init.c:831: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 pixels[16 * 16 * 4] = { 0 }; data/glfw3-3.3.2/src/x11_init.c:884: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[_GLFW_MESSAGE_SIZE]; data/glfw3-3.3.2/src/x11_monitor.c:120: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(disconnected, data/glfw3-3.3.2/src/x11_monitor.c:533: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(ramp->red, gamma->red, size * sizeof(unsigned short)); data/glfw3-3.3.2/src/x11_monitor.c:534: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(ramp->green, gamma->green, size * sizeof(unsigned short)); data/glfw3-3.3.2/src/x11_monitor.c:535: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(ramp->blue, gamma->blue, size * sizeof(unsigned short)); data/glfw3-3.3.2/src/x11_monitor.c:573: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(gamma->red, ramp->red, ramp->size * sizeof(unsigned short)); data/glfw3-3.3.2/src/x11_monitor.c:574: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(gamma->green, ramp->green, ramp->size * sizeof(unsigned short)); data/glfw3-3.3.2/src/x11_monitor.c:575: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(gamma->blue, ramp->blue, ramp->size * sizeof(unsigned short)); data/glfw3-3.3.2/src/x11_platform.h:232: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 keynames[GLFW_KEY_LAST + 1][5]; data/glfw3-3.3.2/src/x11_window.c:417:23: [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 digits[3] = { line[1], line[2], '\0' }; data/glfw3-3.3.2/src/x11_window.c:533: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 mask[XIMaskLen(XI_RawMotion)] = { 0 }; data/glfw3-3.3.2/src/x11_window.c:1293:21: [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[100]; data/glfw3-3.3.2/src/x11_window.c:1318:21: [2] (buffer) wchar_t: 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. wchar_t buffer[16]; data/glfw3-3.3.2/tests/cursor.c:99: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 buffer[64 * 64 * 4]; data/glfw3-3.3.2/tests/cursor.c:119: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 buffer[32 * 32 * 4]; data/glfw3-3.3.2/tests/events.c:224:20: [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 name[16]; data/glfw3-3.3.2/tests/events.c:233: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 name[512]; data/glfw3-3.3.2/tests/events.c:241: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(name, " shift"); data/glfw3-3.3.2/tests/events.c:243: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(name, " control"); data/glfw3-3.3.2/tests/events.c:245: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(name, " alt"); data/glfw3-3.3.2/tests/events.c:247: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(name, " super"); data/glfw3-3.3.2/tests/events.c:249: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(name, " capslock-on"); data/glfw3-3.3.2/tests/events.c:251: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(name, " numlock-on"); data/glfw3-3.3.2/tests/events.c:443: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 string[5] = ""; data/glfw3-3.3.2/tests/events.c:574: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 title[128]; data/glfw3-3.3.2/tests/gamma.c:74: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 buffer[1024]; data/glfw3-3.3.2/tests/gamma.c:119: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(orig_ramp.red, ramp->red, array_size); data/glfw3-3.3.2/tests/gamma.c:120: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(orig_ramp.green, ramp->green, array_size); data/glfw3-3.3.2/tests/gamma.c:121: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(orig_ramp.blue, ramp->blue, array_size); data/glfw3-3.3.2/tests/glfwinfo.c:485:60: [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). glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:489:60: [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). glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:535:51: [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). glfwWindowHint(GLFW_RED_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:541:53: [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). glfwWindowHint(GLFW_GREEN_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:547:52: [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). glfwWindowHint(GLFW_BLUE_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:553:53: [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). glfwWindowHint(GLFW_ALPHA_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:559:53: [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). glfwWindowHint(GLFW_DEPTH_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:565: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). glfwWindowHint(GLFW_STENCIL_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:571:57: [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). glfwWindowHint(GLFW_ACCUM_RED_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:577:59: [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). glfwWindowHint(GLFW_ACCUM_GREEN_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:583:58: [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). glfwWindowHint(GLFW_ACCUM_BLUE_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:589:59: [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). glfwWindowHint(GLFW_ACCUM_ALPHA_BITS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:595:54: [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). glfwWindowHint(GLFW_AUX_BUFFERS, atoi(optarg)); data/glfw3-3.3.2/tests/glfwinfo.c:601: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). glfwWindowHint(GLFW_SAMPLES, atoi(optarg)); data/glfw3-3.3.2/tests/icon.c:59:16: [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 unsigned char icon_colors[5][4] = data/glfw3-3.3.2/tests/icon.c:73: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 pixels[16 * 16 * 4]; data/glfw3-3.3.2/tests/icon.c:82: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(target, icon_colors[icon_color], 4); data/glfw3-3.3.2/tests/inputlag.c:122: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. unsigned char rgba[4]; data/glfw3-3.3.2/tests/joysticks.c:97:24: [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* stream = fopen(paths[i], "rb"); data/glfw3-3.3.2/tests/joysticks.c:117: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 label[1024]; data/glfw3-3.3.2/tests/joysticks.c:279:21: [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[16]; data/glfw3-3.3.2/tests/monitors.c:60: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 buffer[512]; data/glfw3-3.3.2/tests/msaa.c:113:27: [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). samples = atoi(optarg); data/glfw3-3.3.2/tests/tearing.c:74: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 title[256]; data/glfw3-3.3.2/tests/triangle-vulkan.c:268: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 *extension_names[64]; data/glfw3-3.3.2/tests/triangle-vulkan.c:269: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_layers[64]; data/glfw3-3.3.2/tests/triangle-vulkan.c:1178: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, vb, sizeof(vb)); data/glfw3-3.3.2/deps/getopt.c:173:7: [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). if (strlen(argv[optind]) < 3 || strncmp(argv[optind], "--", 2) != 0) data/glfw3-3.3.2/deps/glad_gl.c:1638: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). size_t len = strlen(gl_str_tmp) + 1; data/glfw3-3.3.2/deps/glad_gl.c:1678: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). terminator = loc + strlen(ext); data/glfw3-3.3.2/deps/glad_gl.c:1728:31: [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). const size_t length = strlen(prefixes[i]); data/glfw3-3.3.2/deps/glad_vulkan.c:460:40: [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 extension_name_length = strlen(ext.extensionName) + 1; data/glfw3-3.3.2/deps/glad_vulkan.c:478:44: [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 extension_name_length = strlen(ext.extensionName) + 1; data/glfw3-3.3.2/deps/tinycthread.c:494:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(999999); data/glfw3-3.3.2/deps/tinycthread.c:499:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep((useconds_t)delta); data/glfw3-3.3.2/src/context.c:397:31: [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). const size_t length = strlen(prefixes[i]); data/glfw3-3.3.2/src/context.c:595: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). terminator = where + strlen(string); data/glfw3-3.3.2/src/init.c:118:27: [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). const size_t length = strlen(source); data/glfw3-3.3.2/src/input.c:177: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). length = strlen(fields[i].name); data/glfw3-3.3.2/src/input.c:232: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). length = strlen(_GLFW_PLATFORM_MAPPING_NAME); data/glfw3-3.3.2/src/input.c:441:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(js->guid, guid, sizeof(js->guid) - 1); data/glfw3-3.3.2/src/linux_joystick.c:169:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(name, "Unknown", sizeof(name)); data/glfw3-3.3.2/src/linux_joystick.c:233:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(linjs.path, path, sizeof(linjs.path) - 1); data/glfw3-3.3.2/src/linux_joystick.c:354:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const ssize_t size = read(_glfw.linjs.inotify, buffer, sizeof(buffer)); data/glfw3-3.3.2/src/linux_joystick.c:398:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(js->linjs.fd, &e, sizeof(e)) < 0) data/glfw3-3.3.2/src/win32_joystick.c:750:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(original, guid, sizeof(original) - 1); data/glfw3-3.3.2/src/window.c:425:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(_glfw.hints.window.ns.frameName, value, data/glfw3-3.3.2/src/window.c:429:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(_glfw.hints.window.x11.className, value, data/glfw3-3.3.2/src/window.c:433:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(_glfw.hints.window.x11.instanceName, value, data/glfw3-3.3.2/src/wl_window.c:173: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). name = calloc(strlen(path) + sizeof(template), 1); data/glfw3-3.3.2/src/wl_window.c:869:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats)); data/glfw3-3.3.2/src/wl_window.c:881:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats)); data/glfw3-3.3.2/src/wl_window.c:1712: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). _glfw.wl.clipboardSendSize = strlen(string); data/glfw3-3.3.2/src/wl_window.c:1789:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fds[0], _glfw.wl.clipboardString + len, 4096); data/glfw3-3.3.2/src/x11_window.c:399:35: [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). if (strncmp(line, prefix, strlen(prefix)) == 0) data/glfw3-3.3.2/src/x11_window.c:401: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). line += strlen(prefix); data/glfw3-3.3.2/src/x11_window.c:409:29: [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). char* path = calloc(strlen(line) + 1, 1); data/glfw3-3.3.2/src/x11_window.c:737:13: [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). if (strlen(wndconfig->x11.instanceName) && data/glfw3-3.3.2/src/x11_window.c:738:13: [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(wndconfig->x11.className)) data/glfw3-3.3.2/src/x11_window.c:746: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). if (resourceName && strlen(resourceName)) data/glfw3-3.3.2/src/x11_window.c:748: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). else if (strlen(wndconfig->title)) data/glfw3-3.3.2/src/x11_window.c:753: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). if (strlen(wndconfig->title)) data/glfw3-3.3.2/src/x11_window.c:871: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). strlen(selectionString)); data/glfw3-3.3.2/src/x11_window.c:923:29: [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(selectionString)); data/glfw3-3.3.2/src/x11_window.c:2095:45: [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). (unsigned char*) title, strlen(title)); data/glfw3-3.3.2/src/x11_window.c:2100:45: [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). (unsigned char*) title, strlen(title)); data/glfw3-3.3.2/tests/triangle-vulkan.c:335: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). char *message = (char *)malloc(strlen(pMsg) + 100); ANALYSIS SUMMARY: Hits = 262 Lines analyzed = 85779 in approximately 2.22 seconds (38616 lines/second) Physical Source Lines of Code (SLOC) = 61475 Hits@level = [0] 256 [1] 40 [2] 169 [3] 35 [4] 18 [5] 0 Hits@level+ = [0+] 518 [1+] 262 [2+] 222 [3+] 53 [4+] 18 [5+] 0 Hits/KSLOC@level+ = [0+] 8.42619 [1+] 4.2619 [2+] 3.61122 [3+] 0.862139 [4+] 0.292802 [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.