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/box2d-2.4.1/extern/glad/include/KHR/khrplatform.h Examining data/box2d-2.4.1/extern/glad/include/glad/gl.h Examining data/box2d-2.4.1/extern/glad/src/gl.c Examining data/box2d-2.4.1/extern/glfw/include/GLFW/glfw3.h Examining data/box2d-2.4.1/extern/glfw/include/GLFW/glfw3native.h Examining data/box2d-2.4.1/extern/glfw/src/cocoa_joystick.h Examining data/box2d-2.4.1/extern/glfw/src/cocoa_platform.h Examining data/box2d-2.4.1/extern/glfw/src/cocoa_time.c Examining data/box2d-2.4.1/extern/glfw/src/context.c Examining data/box2d-2.4.1/extern/glfw/src/egl_context.c Examining data/box2d-2.4.1/extern/glfw/src/egl_context.h Examining data/box2d-2.4.1/extern/glfw/src/glfw_config.h Examining data/box2d-2.4.1/extern/glfw/src/glx_context.c Examining data/box2d-2.4.1/extern/glfw/src/glx_context.h Examining data/box2d-2.4.1/extern/glfw/src/init.c Examining data/box2d-2.4.1/extern/glfw/src/input.c Examining data/box2d-2.4.1/extern/glfw/src/internal.h Examining data/box2d-2.4.1/extern/glfw/src/linux_joystick.c Examining data/box2d-2.4.1/extern/glfw/src/linux_joystick.h Examining data/box2d-2.4.1/extern/glfw/src/mappings.h Examining data/box2d-2.4.1/extern/glfw/src/monitor.c Examining data/box2d-2.4.1/extern/glfw/src/nsgl_context.h Examining data/box2d-2.4.1/extern/glfw/src/null_init.c Examining data/box2d-2.4.1/extern/glfw/src/null_joystick.c Examining data/box2d-2.4.1/extern/glfw/src/null_joystick.h Examining data/box2d-2.4.1/extern/glfw/src/null_monitor.c Examining data/box2d-2.4.1/extern/glfw/src/null_platform.h Examining data/box2d-2.4.1/extern/glfw/src/null_window.c Examining data/box2d-2.4.1/extern/glfw/src/osmesa_context.c Examining data/box2d-2.4.1/extern/glfw/src/osmesa_context.h Examining data/box2d-2.4.1/extern/glfw/src/posix_thread.c Examining data/box2d-2.4.1/extern/glfw/src/posix_thread.h Examining data/box2d-2.4.1/extern/glfw/src/posix_time.c Examining data/box2d-2.4.1/extern/glfw/src/posix_time.h Examining data/box2d-2.4.1/extern/glfw/src/vulkan.c Examining data/box2d-2.4.1/extern/glfw/src/wgl_context.c Examining data/box2d-2.4.1/extern/glfw/src/wgl_context.h Examining data/box2d-2.4.1/extern/glfw/src/win32_init.c Examining data/box2d-2.4.1/extern/glfw/src/win32_joystick.c Examining data/box2d-2.4.1/extern/glfw/src/win32_joystick.h Examining data/box2d-2.4.1/extern/glfw/src/win32_monitor.c Examining data/box2d-2.4.1/extern/glfw/src/win32_platform.h Examining data/box2d-2.4.1/extern/glfw/src/win32_thread.c Examining data/box2d-2.4.1/extern/glfw/src/win32_time.c Examining data/box2d-2.4.1/extern/glfw/src/win32_window.c Examining data/box2d-2.4.1/extern/glfw/src/window.c Examining data/box2d-2.4.1/extern/glfw/src/wl_init.c Examining data/box2d-2.4.1/extern/glfw/src/wl_monitor.c Examining data/box2d-2.4.1/extern/glfw/src/wl_platform.h Examining data/box2d-2.4.1/extern/glfw/src/wl_window.c Examining data/box2d-2.4.1/extern/glfw/src/x11_init.c Examining data/box2d-2.4.1/extern/glfw/src/x11_monitor.c Examining data/box2d-2.4.1/extern/glfw/src/x11_platform.h Examining data/box2d-2.4.1/extern/glfw/src/x11_window.c Examining data/box2d-2.4.1/extern/glfw/src/xkb_unicode.c Examining data/box2d-2.4.1/extern/glfw/src/xkb_unicode.h Examining data/box2d-2.4.1/extern/imgui/imconfig.h Examining data/box2d-2.4.1/extern/imgui/imgui.cpp Examining data/box2d-2.4.1/extern/imgui/imgui.h Examining data/box2d-2.4.1/extern/imgui/imgui_demo.cpp Examining data/box2d-2.4.1/extern/imgui/imgui_draw.cpp Examining data/box2d-2.4.1/extern/imgui/imgui_internal.h Examining data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp Examining data/box2d-2.4.1/extern/imgui/imstb_rectpack.h Examining data/box2d-2.4.1/extern/imgui/imstb_textedit.h Examining data/box2d-2.4.1/extern/imgui/imstb_truetype.h Examining data/box2d-2.4.1/extern/sajson/sajson.cpp Examining data/box2d-2.4.1/extern/sajson/sajson.h Examining data/box2d-2.4.1/include/box2d/b2_api.h Examining data/box2d-2.4.1/include/box2d/b2_block_allocator.h Examining data/box2d-2.4.1/include/box2d/b2_body.h Examining data/box2d-2.4.1/include/box2d/b2_broad_phase.h Examining data/box2d-2.4.1/include/box2d/b2_chain_shape.h Examining data/box2d-2.4.1/include/box2d/b2_circle_shape.h Examining data/box2d-2.4.1/include/box2d/b2_collision.h Examining data/box2d-2.4.1/include/box2d/b2_common.h Examining data/box2d-2.4.1/include/box2d/b2_contact.h Examining data/box2d-2.4.1/include/box2d/b2_contact_manager.h Examining data/box2d-2.4.1/include/box2d/b2_distance.h Examining data/box2d-2.4.1/include/box2d/b2_distance_joint.h Examining data/box2d-2.4.1/include/box2d/b2_draw.h Examining data/box2d-2.4.1/include/box2d/b2_dynamic_tree.h Examining data/box2d-2.4.1/include/box2d/b2_edge_shape.h Examining data/box2d-2.4.1/include/box2d/b2_fixture.h Examining data/box2d-2.4.1/include/box2d/b2_friction_joint.h Examining data/box2d-2.4.1/include/box2d/b2_gear_joint.h Examining data/box2d-2.4.1/include/box2d/b2_growable_stack.h Examining data/box2d-2.4.1/include/box2d/b2_joint.h Examining data/box2d-2.4.1/include/box2d/b2_math.h Examining data/box2d-2.4.1/include/box2d/b2_motor_joint.h Examining data/box2d-2.4.1/include/box2d/b2_mouse_joint.h Examining data/box2d-2.4.1/include/box2d/b2_polygon_shape.h Examining data/box2d-2.4.1/include/box2d/b2_prismatic_joint.h Examining data/box2d-2.4.1/include/box2d/b2_pulley_joint.h Examining data/box2d-2.4.1/include/box2d/b2_revolute_joint.h Examining data/box2d-2.4.1/include/box2d/b2_rope.h Examining data/box2d-2.4.1/include/box2d/b2_settings.h Examining data/box2d-2.4.1/include/box2d/b2_shape.h Examining data/box2d-2.4.1/include/box2d/b2_stack_allocator.h Examining data/box2d-2.4.1/include/box2d/b2_time_of_impact.h Examining data/box2d-2.4.1/include/box2d/b2_time_step.h Examining data/box2d-2.4.1/include/box2d/b2_timer.h Examining data/box2d-2.4.1/include/box2d/b2_types.h Examining data/box2d-2.4.1/include/box2d/b2_weld_joint.h Examining data/box2d-2.4.1/include/box2d/b2_wheel_joint.h Examining data/box2d-2.4.1/include/box2d/b2_world.h Examining data/box2d-2.4.1/include/box2d/b2_world_callbacks.h Examining data/box2d-2.4.1/include/box2d/box2d.h Examining data/box2d-2.4.1/src/collision/b2_broad_phase.cpp Examining data/box2d-2.4.1/src/collision/b2_chain_shape.cpp Examining data/box2d-2.4.1/src/collision/b2_circle_shape.cpp Examining data/box2d-2.4.1/src/collision/b2_collide_circle.cpp Examining data/box2d-2.4.1/src/collision/b2_collide_edge.cpp Examining data/box2d-2.4.1/src/collision/b2_collide_polygon.cpp Examining data/box2d-2.4.1/src/collision/b2_collision.cpp Examining data/box2d-2.4.1/src/collision/b2_distance.cpp Examining data/box2d-2.4.1/src/collision/b2_dynamic_tree.cpp Examining data/box2d-2.4.1/src/collision/b2_edge_shape.cpp Examining data/box2d-2.4.1/src/collision/b2_polygon_shape.cpp Examining data/box2d-2.4.1/src/collision/b2_time_of_impact.cpp Examining data/box2d-2.4.1/src/common/b2_block_allocator.cpp Examining data/box2d-2.4.1/src/common/b2_draw.cpp Examining data/box2d-2.4.1/src/common/b2_math.cpp Examining data/box2d-2.4.1/src/common/b2_settings.cpp Examining data/box2d-2.4.1/src/common/b2_stack_allocator.cpp Examining data/box2d-2.4.1/src/common/b2_timer.cpp Examining data/box2d-2.4.1/src/dynamics/b2_body.cpp Examining data/box2d-2.4.1/src/dynamics/b2_chain_circle_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_chain_circle_contact.h Examining data/box2d-2.4.1/src/dynamics/b2_chain_polygon_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_chain_polygon_contact.h Examining data/box2d-2.4.1/src/dynamics/b2_circle_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_circle_contact.h Examining data/box2d-2.4.1/src/dynamics/b2_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_contact_manager.cpp Examining data/box2d-2.4.1/src/dynamics/b2_contact_solver.cpp Examining data/box2d-2.4.1/src/dynamics/b2_contact_solver.h Examining data/box2d-2.4.1/src/dynamics/b2_distance_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_edge_circle_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_edge_circle_contact.h Examining data/box2d-2.4.1/src/dynamics/b2_edge_polygon_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_edge_polygon_contact.h Examining data/box2d-2.4.1/src/dynamics/b2_fixture.cpp Examining data/box2d-2.4.1/src/dynamics/b2_friction_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_gear_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_island.cpp Examining data/box2d-2.4.1/src/dynamics/b2_island.h Examining data/box2d-2.4.1/src/dynamics/b2_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_motor_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_mouse_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_polygon_circle_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_polygon_circle_contact.h Examining data/box2d-2.4.1/src/dynamics/b2_polygon_contact.cpp Examining data/box2d-2.4.1/src/dynamics/b2_polygon_contact.h Examining data/box2d-2.4.1/src/dynamics/b2_prismatic_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_pulley_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_revolute_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_weld_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_wheel_joint.cpp Examining data/box2d-2.4.1/src/dynamics/b2_world.cpp Examining data/box2d-2.4.1/src/dynamics/b2_world_callbacks.cpp Examining data/box2d-2.4.1/src/rope/b2_rope.cpp Examining data/box2d-2.4.1/testbed/draw.cpp Examining data/box2d-2.4.1/testbed/draw.h Examining data/box2d-2.4.1/testbed/imgui_impl_glfw.cpp Examining data/box2d-2.4.1/testbed/imgui_impl_glfw.h Examining data/box2d-2.4.1/testbed/imgui_impl_opengl3.cpp Examining data/box2d-2.4.1/testbed/imgui_impl_opengl3.h Examining data/box2d-2.4.1/testbed/main.cpp Examining data/box2d-2.4.1/testbed/settings.cpp Examining data/box2d-2.4.1/testbed/settings.h Examining data/box2d-2.4.1/testbed/test.cpp Examining data/box2d-2.4.1/testbed/test.h Examining data/box2d-2.4.1/testbed/tests/add_pair.cpp Examining data/box2d-2.4.1/testbed/tests/apply_force.cpp Examining data/box2d-2.4.1/testbed/tests/body_types.cpp Examining data/box2d-2.4.1/testbed/tests/box_stack.cpp Examining data/box2d-2.4.1/testbed/tests/breakable.cpp Examining data/box2d-2.4.1/testbed/tests/bridge.cpp Examining data/box2d-2.4.1/testbed/tests/bullet_test.cpp Examining data/box2d-2.4.1/testbed/tests/cantilever.cpp Examining data/box2d-2.4.1/testbed/tests/car.cpp Examining data/box2d-2.4.1/testbed/tests/chain.cpp Examining data/box2d-2.4.1/testbed/tests/chain_problem.cpp Examining data/box2d-2.4.1/testbed/tests/character_collision.cpp Examining data/box2d-2.4.1/testbed/tests/circle_stack.cpp Examining data/box2d-2.4.1/testbed/tests/collision_filtering.cpp Examining data/box2d-2.4.1/testbed/tests/collision_processing.cpp Examining data/box2d-2.4.1/testbed/tests/compound_shapes.cpp Examining data/box2d-2.4.1/testbed/tests/confined.cpp Examining data/box2d-2.4.1/testbed/tests/continuous_test.cpp Examining data/box2d-2.4.1/testbed/tests/convex_hull.cpp Examining data/box2d-2.4.1/testbed/tests/conveyor_belt.cpp Examining data/box2d-2.4.1/testbed/tests/distance_joint.cpp Examining data/box2d-2.4.1/testbed/tests/distance_test.cpp Examining data/box2d-2.4.1/testbed/tests/dominos.cpp Examining data/box2d-2.4.1/testbed/tests/dump_loader.cpp Examining data/box2d-2.4.1/testbed/tests/dynamic_tree.cpp Examining data/box2d-2.4.1/testbed/tests/edge_shapes.cpp Examining data/box2d-2.4.1/testbed/tests/edge_test.cpp Examining data/box2d-2.4.1/testbed/tests/friction.cpp Examining data/box2d-2.4.1/testbed/tests/gear_joint.cpp Examining data/box2d-2.4.1/testbed/tests/heavy1.cpp Examining data/box2d-2.4.1/testbed/tests/heavy2.cpp Examining data/box2d-2.4.1/testbed/tests/mobile_balanced.cpp Examining data/box2d-2.4.1/testbed/tests/mobile_unbalanced.cpp Examining data/box2d-2.4.1/testbed/tests/motor_joint.cpp Examining data/box2d-2.4.1/testbed/tests/pinball.cpp Examining data/box2d-2.4.1/testbed/tests/platformer.cpp Examining data/box2d-2.4.1/testbed/tests/polygon_collision.cpp Examining data/box2d-2.4.1/testbed/tests/polygon_shapes.cpp Examining data/box2d-2.4.1/testbed/tests/prismatic_joint.cpp Examining data/box2d-2.4.1/testbed/tests/pulley_joint.cpp Examining data/box2d-2.4.1/testbed/tests/pyramid.cpp Examining data/box2d-2.4.1/testbed/tests/ray_cast.cpp Examining data/box2d-2.4.1/testbed/tests/restitution.cpp Examining data/box2d-2.4.1/testbed/tests/revolute_joint.cpp Examining data/box2d-2.4.1/testbed/tests/rope.cpp Examining data/box2d-2.4.1/testbed/tests/sensor.cpp Examining data/box2d-2.4.1/testbed/tests/shape_cast.cpp Examining data/box2d-2.4.1/testbed/tests/shape_editing.cpp Examining data/box2d-2.4.1/testbed/tests/skier.cpp Examining data/box2d-2.4.1/testbed/tests/slider_crank_1.cpp Examining data/box2d-2.4.1/testbed/tests/slider_crank_2.cpp Examining data/box2d-2.4.1/testbed/tests/theo_jansen.cpp Examining data/box2d-2.4.1/testbed/tests/tiles.cpp Examining data/box2d-2.4.1/testbed/tests/time_of_impact.cpp Examining data/box2d-2.4.1/testbed/tests/tumbler.cpp Examining data/box2d-2.4.1/testbed/tests/web.cpp Examining data/box2d-2.4.1/testbed/tests/wheel_joint.cpp Examining data/box2d-2.4.1/testbed/tests/wrecking_ball.cpp Examining data/box2d-2.4.1/unit-test/collision_test.cpp Examining data/box2d-2.4.1/unit-test/doctest.h Examining data/box2d-2.4.1/unit-test/hello_world.cpp Examining data/box2d-2.4.1/unit-test/joint_test.cpp Examining data/box2d-2.4.1/unit-test/math_test.cpp Examining data/box2d-2.4.1/unit-test/world_test.cpp FINAL RESULTS: data/box2d-2.4.1/extern/glad/include/glad/gl.h:1253:73: [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/box2d-2.4.1/extern/glad/include/glad/gl.h:1254:118: [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/box2d-2.4.1/extern/glad/src/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/box2d-2.4.1/extern/glfw/src/init.c:118: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/box2d-2.4.1/extern/glfw/src/init.c:163: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/box2d-2.4.1/extern/glfw/src/init.c:211: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/box2d-2.4.1/extern/glfw/src/input.c:439: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(js->guid, guid); data/box2d-2.4.1/extern/glfw/src/internal.h:731: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/box2d-2.4.1/extern/glfw/src/win32_joystick.c:748: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(original, guid); data/box2d-2.4.1/extern/glfw/src/win32_monitor.c:101: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/box2d-2.4.1/extern/glfw/src/win32_monitor.c:110: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/box2d-2.4.1/extern/glfw/src/wl_window.c:169: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/box2d-2.4.1/extern/glfw/src/wl_window.c:170: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/box2d-2.4.1/extern/glfw/src/x11_window.c:1061: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/box2d-2.4.1/extern/imgui/imgui.cpp:1383:35: [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. #if defined(_MSC_VER) && !defined(vsnprintf) data/box2d-2.4.1/extern/imgui/imgui.cpp:1384: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. #define vsnprintf _vsnprintf data/box2d-2.4.1/extern/imgui/imgui.cpp:1394:13: [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. int w = vsnprintf(buf, buf_size, fmt, args); data/box2d-2.4.1/extern/imgui/imgui.cpp:1410:13: [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. int w = vsnprintf(buf, buf_size, fmt, args); data/box2d-2.4.1/extern/imgui/imgui.cpp:8626:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(g.LogFile, fmt, args); data/box2d-2.4.1/extern/imgui/imgui.h:67:59: [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 IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1))) // Apply printf-style warnings to user functions. data/box2d-2.4.1/extern/imgui/imgui.h:68:59: [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 IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0))) data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:65: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. #define vsnprintf _vsnprintf data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2122:23: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. char buf[64]; sprintf(buf, "Button: %s###Button", name); // ### operator override ID ignoring the preceding label data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2550:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(label, "Mouse cursor %d: %s", i, mouse_cursors_names[i]); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3106: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(buf, IM_ARRAYSIZE(buf), fmt, args); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3984:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "Save %s", doc->Name); data/box2d-2.4.1/extern/imgui/imgui_internal.h:123:41: [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 IMGUI_DEBUG_LOG(_FMT,...) printf("[%05d] " _FMT, GImGui->FrameCount, __VA_ARGS__) data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1612:19: [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. If the scanf format is influenceable by an attacker, it's exploitable. if (op && sscanf(initial_value_buf, format, &arg0i) < 1) data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1618:35: [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. If the scanf format is influenceable by an attacker, it's exploitable. else { if (sscanf(buf, format, &arg1i) == 1) *v = arg1i; } // Assign constant data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1624:9: [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. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(buf, format, data_ptr); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1632:19: [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. If the scanf format is influenceable by an attacker, it's exploitable. if (op && sscanf(initial_value_buf, format, &arg0f) < 1) data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1634:13: [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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(buf, format, &arg1f) < 1) data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1646:19: [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. If the scanf format is influenceable by an attacker, it's exploitable. if (op && sscanf(initial_value_buf, format, &arg0f) < 1) data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1648:13: [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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(buf, format, &arg1f) < 1) data/box2d-2.4.1/extern/sajson/sajson.h:46:25: [4] (format) snprintf: 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 SAJSON_snprintf snprintf data/box2d-2.4.1/extern/sajson/sajson.h:53:25: [4] (format) _snprintf: 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 SAJSON_snprintf _snprintf data/box2d-2.4.1/extern/sajson/sajson.h:55:25: [4] (format) snprintf: 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 SAJSON_snprintf snprintf data/box2d-2.4.1/extern/sajson/sajson.h:62:25: [4] (format) snprintf: 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 SAJSON_snprintf snprintf data/box2d-2.4.1/extern/sajson/sajson.h:751:13: [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(formatted_error_message, rhs.formatted_error_message); data/box2d-2.4.1/src/common/b2_settings.cpp:46:2: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(string, args); data/box2d-2.4.1/src/common/b2_settings.cpp:66:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(b2_dumpFile, string, args); data/box2d-2.4.1/testbed/imgui_impl_opengl3.cpp:119: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(g_GlslVersionString, glsl_version); data/box2d-2.4.1/testbed/main.cpp:590:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s : %s", entry.category, entry.name); data/box2d-2.4.1/unit-test/doctest.h:3307:14: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. std::sprintf(buf, fmt, in); \ data/box2d-2.4.1/extern/glfw/src/win32_thread.c:75:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&mutex->win32.section); data/box2d-2.4.1/extern/glfw/src/win32_thread.c:89: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/box2d-2.4.1/extern/glfw/src/wl_init.c:414: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/box2d-2.4.1/extern/glfw/src/wl_init.c:416: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/box2d-2.4.1/extern/glfw/src/wl_init.c:418: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/box2d-2.4.1/extern/glfw/src/wl_init.c:1167: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/box2d-2.4.1/extern/glfw/src/wl_init.c:1168: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/box2d-2.4.1/extern/glfw/src/wl_window.c:161: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/box2d-2.4.1/extern/glfw/src/x11_init.c:940: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/box2d-2.4.1/extern/glfw/src/x11_window.c:746: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/box2d-2.4.1/testbed/tests/dynamic_tree.cpp:39:3: [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(888); data/box2d-2.4.1/unit-test/doctest.h:5750:18: [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. std::srand(p->rand_seed); data/box2d-2.4.1/extern/glad/src/gl.c:804: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/box2d-2.4.1/extern/glfw/include/GLFW/glfw3.h:1617: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/box2d-2.4.1/extern/glfw/src/cocoa_platform.h:116: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 keyName[64]; data/box2d-2.4.1/extern/glfw/src/init.c:156: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/box2d-2.4.1/extern/glfw/src/init.c:171: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/box2d-2.4.1/extern/glfw/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, "There is no current context"); data/box2d-2.4.1/extern/glfw/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, "Invalid argument for enum parameter"); data/box2d-2.4.1/extern/glfw/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 value for parameter"); data/box2d-2.4.1/extern/glfw/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, "Out of memory"); data/box2d-2.4.1/extern/glfw/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, "The requested API is unavailable"); data/box2d-2.4.1/extern/glfw/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 version is unavailable"); data/box2d-2.4.1/extern/glfw/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, "A platform-specific error occurred"); data/box2d-2.4.1/extern/glfw/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, "The requested format is unavailable"); data/box2d-2.4.1/extern/glfw/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 specified window has no context"); data/box2d-2.4.1/extern/glfw/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, "ERROR: UNKNOWN GLFW ERROR"); data/box2d-2.4.1/extern/glfw/src/input.c:154: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/box2d-2.4.1/extern/glfw/src/input.c:164: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/box2d-2.4.1/extern/glfw/src/input.c:1092: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/box2d-2.4.1/extern/glfw/src/input.c:1099: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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/src/internal.h:469: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/box2d-2.4.1/extern/glfw/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 guid[33]; data/box2d-2.4.1/extern/glfw/src/internal.h:488: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:63: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:130: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:131: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:132: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:133: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:134: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:148: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:177: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:185: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:232: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:304: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:348: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:365: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/box2d-2.4.1/extern/glfw/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/box2d-2.4.1/extern/glfw/src/win32_init.c:389:13: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). count = MultiByteToWideChar(CP_UTF8, 0, source, -1, NULL, 0); data/box2d-2.4.1/extern/glfw/src/win32_init.c:399:10: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (!MultiByteToWideChar(CP_UTF8, 0, source, -1, target, count)) data/box2d-2.4.1/extern/glfw/src/win32_init.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 message[_GLFW_MESSAGE_SIZE] = ""; data/box2d-2.4.1/extern/glfw/src/win32_joystick.c:211: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/box2d-2.4.1/extern/glfw/src/win32_joystick.c:352: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/box2d-2.4.1/extern/glfw/src/win32_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 name[256]; data/box2d-2.4.1/extern/glfw/src/win32_joystick.c:453: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/box2d-2.4.1/extern/glfw/src/win32_joystick.c:461: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/box2d-2.4.1/extern/glfw/src/win32_joystick.c:536: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/box2d-2.4.1/extern/glfw/src/win32_joystick.c:557: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/box2d-2.4.1/extern/glfw/src/win32_joystick.c:747: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/box2d-2.4.1/extern/glfw/src/win32_joystick.c:749: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/box2d-2.4.1/extern/glfw/src/win32_monitor.c:146: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/box2d-2.4.1/extern/glfw/src/win32_monitor.c:469: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, 256 * sizeof(unsigned short)); data/box2d-2.4.1/extern/glfw/src/win32_monitor.c:470: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 + 256, 256 * sizeof(unsigned short)); data/box2d-2.4.1/extern/glfw/src/win32_monitor.c:471: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 + 512, 256 * sizeof(unsigned short)); data/box2d-2.4.1/extern/glfw/src/win32_monitor.c:488: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(values + 0, ramp->red, 256 * sizeof(unsigned short)); data/box2d-2.4.1/extern/glfw/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(values + 256, ramp->green, 256 * sizeof(unsigned short)); data/box2d-2.4.1/extern/glfw/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(values + 512, ramp->blue, 256 * sizeof(unsigned short)); data/box2d-2.4.1/extern/glfw/src/win32_platform.h:326: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/box2d-2.4.1/extern/glfw/src/win32_platform.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 publicAdapterName[32]; data/box2d-2.4.1/extern/glfw/src/win32_platform.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 publicDisplayName[32]; data/box2d-2.4.1/extern/glfw/src/win32_window.c:2057:22: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). characterCount = MultiByteToWideChar(CP_UTF8, 0, string, -1, NULL, 0); data/box2d-2.4.1/extern/glfw/src/win32_window.c:2078:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, string, -1, buffer, characterCount); data/box2d-2.4.1/extern/glfw/src/wl_monitor.c:47: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/box2d-2.4.1/extern/glfw/src/x11_init.c:243: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/box2d-2.4.1/extern/glfw/src/x11_init.c:250: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/box2d-2.4.1/extern/glfw/src/x11_init.c:771: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/box2d-2.4.1/extern/glfw/src/x11_init.c:821: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/box2d-2.4.1/extern/glfw/src/x11_init.c:874: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/box2d-2.4.1/extern/glfw/src/x11_monitor.c:119: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/box2d-2.4.1/extern/glfw/src/x11_monitor.c:436: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/box2d-2.4.1/extern/glfw/src/x11_monitor.c:437: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/box2d-2.4.1/extern/glfw/src/x11_monitor.c:438: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/box2d-2.4.1/extern/glfw/src/x11_monitor.c:476: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/box2d-2.4.1/extern/glfw/src/x11_monitor.c:477: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/box2d-2.4.1/extern/glfw/src/x11_monitor.c:478: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/box2d-2.4.1/extern/glfw/src/x11_platform.h:231: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 keyName[5]; data/box2d-2.4.1/extern/glfw/src/x11_window.c:414: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/box2d-2.4.1/extern/glfw/src/x11_window.c:541: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 mask[XIMaskLen(XI_RawMotion)] = { 0 }; data/box2d-2.4.1/extern/glfw/src/x11_window.c:1272: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/box2d-2.4.1/extern/glfw/src/x11_window.c:1297: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/box2d-2.4.1/extern/imgui/imgui.cpp:1289:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char*)memcpy(buf, (const void*)str, len + 1); data/box2d-2.4.1/extern/imgui/imgui.cpp:1303:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char*)memcpy(dst, (const void*)src, src_size); data/box2d-2.4.1/extern/imgui/imgui.cpp:1479:12: [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). return fopen(filename, mode); data/box2d-2.4.1/extern/imgui/imgui.cpp:3398: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(g.IO.KeysDownDurationPrev, g.IO.KeysDownDuration, sizeof(g.IO.KeysDownDuration)); data/box2d-2.4.1/extern/imgui/imgui.cpp:3652: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(&Layers[0][n], &layer[0], layer.Size * sizeof(ImDrawList*)); data/box2d-2.4.1/extern/imgui/imgui.cpp:4256: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/box2d-2.4.1/extern/imgui/imgui.cpp:6544: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 window_name[16]; data/box2d-2.4.1/extern/imgui/imgui.cpp:6762: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[20]; data/box2d-2.4.1/extern/imgui/imgui.cpp:7072: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[128]; data/box2d-2.4.1/extern/imgui/imgui.cpp:7450: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(g.IO.NavInputsDownDurationPrev, g.IO.NavInputsDownDuration, sizeof(g.IO.NavInputsDownDuration)); data/box2d-2.4.1/extern/imgui/imgui.cpp:7682:147: [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. if (g.NavWindow) { ImU32 col = (!g.NavWindow->Hidden) ? IM_COL32(255,0,255,255) : IM_COL32(255,0,0,255); ImVec2 p = NavCalcPreferredRefPos(); char buf[32]; ImFormatString(buf, 32, "%d", g.NavLayer); GetOverlayDrawList(g.NavWindow)->AddCircleFilled(p, 3.0f, col); GetOverlayDrawList(g.NavWindow)->AddText(NULL, 13.0f, p + ImVec2(8,-4), col, buf); } data/box2d-2.4.1/extern/imgui/imgui.cpp:8470: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(payload.Data, data, data_size); data/box2d-2.4.1/extern/imgui/imgui.cpp:8477: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(payload.Data, data, data_size); data/box2d-2.4.1/extern/imgui/imgui.cpp:8851: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, ini_data, ini_size); data/box2d-2.4.1/extern/imgui/imgui.cpp:9073: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(&g.PrivateClipboard[0], text, (size_t)(text_end - text)); data/box2d-2.4.1/extern/imgui/imgui.cpp:9180:25: [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[300]; data/box2d-2.4.1/extern/imgui/imgui.cpp:9257: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 buf[256]; data/box2d-2.4.1/extern/imgui/imgui.cpp:9330: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 buf[32]; data/box2d-2.4.1/extern/imgui/imgui.h:1180:90: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. inline ImVector<T>& operator=(const ImVector<T>& src) { clear(); resize(src.Size); memcpy(Data, src.Data, (size_t)Size * sizeof(T)); return *this; } data/box2d-2.4.1/extern/imgui/imgui.h:1202:182: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. inline void resize(int new_size, const T& v) { if (new_size > Capacity) reserve(_grow_capacity(new_size)); if (new_size > Size) for (int n = Size; n < new_size; n++) memcpy(&Data[n], &v, sizeof(v)); Size = new_size; } data/box2d-2.4.1/extern/imgui/imgui.h:1203:182: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. inline void reserve(int new_capacity) { if (new_capacity <= Capacity) return; T* new_data = (T*)ImGui::MemAlloc((size_t)new_capacity * sizeof(T)); if (Data) { memcpy(new_data, Data, (size_t)Size * sizeof(T)); ImGui::MemFree(Data); } Data = new_data; Capacity = new_capacity; } data/box2d-2.4.1/extern/imgui/imgui.h:1206:120: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } data/box2d-2.4.1/extern/imgui/imgui.h:1211:160: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. inline T* erase_unsorted(const T* it) { IM_ASSERT(it >= Data && it < Data+Size); const ptrdiff_t off = it - Data; if (it < Data+Size-1) memcpy(Data + off, Data + Size - 1, sizeof(T)); Size--; return Data + off; } data/box2d-2.4.1/extern/imgui/imgui.h:1212:295: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. inline T* insert(const T* it, const T& v) { IM_ASSERT(it >= Data && it <= Data+Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(_grow_capacity(Size + 1)); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(T)); memcpy(&Data[off], &v, sizeof(v)); Size++; return Data + off; } data/box2d-2.4.1/extern/imgui/imgui.h:1460: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 DataType[32+1]; // Data type tag (short user-supplied string, 32 characters max) data/box2d-2.4.1/extern/imgui/imgui.h:1564: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 InputBuf[256]; data/box2d-2.4.1/extern/imgui/imgui.h:1574: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 EmptyString[1]; data/box2d-2.4.1/extern/imgui/imgui.h:1921: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[40]; // Name (strictly to ease debugging) data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:474: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 str0[128] = "Hello, world!"; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:699: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 buf[32] = "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e"; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:822: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 buf[32]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:823:17: [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(buf, "Object %d", n); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:835: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 buf[32]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:836:17: [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(buf, "Object %d", n); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:861: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 label[32]; sprintf(label, "Item %d", i); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:861:33: [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. char label[32]; sprintf(label, "Item %d", i); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:892: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. static char buf1[64] = ""; ImGui::InputText("default", buf1, 64); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:893: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. static char buf2[64] = ""; ImGui::InputText("decimal", buf2, 64, ImGuiInputTextFlags_CharsDecimal); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:894: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. static char buf3[64] = ""; ImGui::InputText("hexadecimal", buf3, 64, ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:895: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. static char buf4[64] = ""; ImGui::InputText("uppercase", buf4, 64, ImGuiInputTextFlags_CharsUppercase); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:896: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. static char buf5[64] = ""; ImGui::InputText("no blank", buf5, 64, ImGuiInputTextFlags_CharsNoBlank); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:898: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. static char buf6[64] = ""; ImGui::InputText("\"imgui\" letters", buf6, 64, ImGuiInputTextFlags_CallbackCharFilter, TextFilters::FilterImGuiLetters); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:901: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. static char bufpass[64] = "password123"; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:914: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. static char text[1024*16] = data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:991: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/box2d-2.4.1/extern/imgui/imgui_demo.cpp:992: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(buf, "%d/%d", (int)(progress_saturated*1753), 1753); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:1075:25: [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((float*)&saved_palette[n], payload->Data, sizeof(float) * 3); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:1077:25: [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((float*)&saved_palette[n], payload->Data, sizeof(float) * 4); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:1573: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 buf[32]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:1574:17: [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(buf, "%03d", i); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:1958: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 num_buf[16]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:1959:17: [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(num_buf, "%d", n); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2121: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. static char name[32] = "Label1"; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2122: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]; sprintf(buf, "Button: %s###Button", name); // ### operator override ID ignoring the preceding label data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2231: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 label[32]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2232: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(label, "Item %d", n); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2253: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 label[32]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2254: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(label, "%04d", i); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2462: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 buf[32] = "dummy"; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2480: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 buf[128] = "click on a button to set focus"; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2549: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 label[32]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3061: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 InputBuf[256]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3089:142: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static char* Strdup(const char *str) { size_t len = strlen(str) + 1; void* buff = malloc(len); return (char*)memcpy(buff, (const void*)str, len); } data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3103: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[1024]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3516: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 label[128]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3517: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(label, "MyObject %d", i); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3814: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[128]; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3815:5: [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(buf, "Animated title %c %d###AnimatedTitle", "|/-\\"[(int)(ImGui::GetTime() / 0.25f) & 3], ImGui::GetFrameCount()); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3950:27: [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). Open = OpenPrev = open; data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3983: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[256]; data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:580:43: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (int sz = ch.CmdBuffer.Size) { memcpy(cmd_write, ch.CmdBuffer.Data, sz * sizeof(ImDrawCmd)); cmd_write += sz; } data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:581:43: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (int sz = ch.IdxBuffer.Size) { memcpy(_IdxWritePtr, ch.IdxBuffer.Data, sz * sizeof(ImDrawIdx)); _IdxWritePtr += sz; } data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:591: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(&_Channels.Data[_ChannelsCurrent].CmdBuffer, &CmdBuffer, sizeof(CmdBuffer)); // copy 12 bytes, four times data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:592: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(&_Channels.Data[_ChannelsCurrent].IdxBuffer, &IdxBuffer, sizeof(IdxBuffer)); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1378: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 FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] = data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1554: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(new_font_cfg.FontData, font_cfg->FontData, (size_t)new_font_cfg.FontDataSize); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1587:35: [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. if (font_cfg.Name[0] == '\0') strcpy(font_cfg.Name, "ProggyClean.ttf, 13px"); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1719:58: [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. void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_brighten_factor) data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1728:59: [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. void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char* pixels, int x, int y, int w, int h, int stride) data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1885: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. unsigned char multiply_table[256]; data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:2171: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(full_ranges, base_ranges, sizeof(base_ranges)); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:2229: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(full_ranges, base_ranges, sizeof(base_ranges)); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:3007: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(stb__dout, data, length); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:3108: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 proggy_clean_ttf_compressed_data_base85[11980+1] = data/box2d-2.4.1/extern/imgui/imgui_internal.h:835: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 DragDropPayloadBufLocal[8]; // Local buffer for small payloads data/box2d-2.4.1/extern/imgui/imgui_internal.h:879: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 TempBuffer[1024*3+1]; // Temporary text buffer data/box2d-2.4.1/extern/imgui/imgui_internal.h:1445:78: [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. IMGUI_API void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_multiply_factor); data/box2d-2.4.1/extern/imgui/imgui_internal.h:1446:79: [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. IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char* pixels, int x, int y, int w, int h, int stride); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1036: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 overlay_buf[32]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1341: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[16]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1601: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_backup, data_ptr, GDataTypeInfo[data_type].Size); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1685: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 v_str[64]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1916: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 value_buf[64]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2355: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 value_buf[64]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2495: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 value_buf[64]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2620: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 fmt_buf[32]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2621: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 data_buf[32]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2651: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[64]; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2754: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 format[16] = "%f"; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2762: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 format[16] = "%f"; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2770: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 format[16] = "%f"; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2778: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 format[16] = "%f"; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:2961: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(text + pos, new_text, (size_t)new_text_len * sizeof(ImWchar)); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3047: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 + pos, new_text, (size_t)new_text_len * sizeof(char)); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3217: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(edit_state.InitialText.Data, buf, init_buf_len + 1); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3903: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/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3996: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((float*)col, payload->Data, sizeof(float) * 3); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:4001: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((float*)col, payload->Data, sizeof(float) * components); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:4121: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(backup_initial_col, col, components * sizeof(float)); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:4241: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(col, ref_col, components * sizeof(float)); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:4534: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/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:4578: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(&dummy_ref_col.x, ref_col, sizeof(float) * (picker_flags & ImGuiColorEditFlags_NoAlpha ? 3 : 4)); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:5391: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 fmt[64]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:278:10: [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 ttf_buffer[1<<20]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:279:10: [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 temp_bitmap[512*512]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:286:32: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fread(ttf_buffer, 1, 1<<20, fopen("c:/windows/fonts/times.ttf", "rb")); data/box2d-2.4.1/extern/imgui/imstb_truetype.h:327:1: [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 ttf_buffer[1<<25]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:333:32: [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). int w,h,i,j,c = (argc > 1 ? atoi(argv[1]) : 'a'), s = (argc > 2 ? atoi(argv[2]) : 20); data/box2d-2.4.1/extern/imgui/imstb_truetype.h:333:70: [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). int w,h,i,j,c = (argc > 1 ? atoi(argv[1]) : 'a'), s = (argc > 2 ? atoi(argv[2]) : 20); data/box2d-2.4.1/extern/imgui/imstb_truetype.h:335:32: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fread(ttf_buffer, 1, 1<<25, fopen(argc > 3 ? argv[3] : "c:/windows/fonts/arialbd.ttf", "rb")); data/box2d-2.4.1/extern/imgui/imstb_truetype.h:367:1: [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[24<<20]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:368:10: [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 screen[20][79]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:377:30: [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). fread(buffer, 1, 1000000, fopen("c:/windows/fonts/arialbd.ttf", "rb")); data/box2d-2.4.1/extern/imgui/imstb_truetype.h:431: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. typedef char stbtt__check_size32[sizeof(stbtt_int32)==4 ? 1 : -1]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:432: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. typedef char stbtt__check_size16[sizeof(stbtt_int16)==2 ? 1 : -1]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:482:31: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define STBTT_memcpy memcpy data/box2d-2.4.1/extern/imgui/imstb_truetype.h:2821: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 scanline_data[512], *scanline; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:3822: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 buffer[STBTT_MAX_OVERSAMPLE]; data/box2d-2.4.1/extern/imgui/imstb_truetype.h:3884: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 buffer[STBTT_MAX_OVERSAMPLE]; data/box2d-2.4.1/extern/sajson/sajson.h:107:35: [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 unsigned char parse_flags[256]; data/box2d-2.4.1/extern/sajson/sajson.h:209: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 data[1]; data/box2d-2.4.1/extern/sajson/sajson.h:286: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(data, s.data(), length_); data/box2d-2.4.1/extern/sajson/sajson.h:296: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(data, s.data(), length_); data/box2d-2.4.1/extern/sajson/sajson.h:419: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(location, &value, sizeof(value)); data/box2d-2.4.1/extern/sajson/sajson.h:430: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(&value, location, sizeof(double)); data/box2d-2.4.1/extern/sajson/sajson.h:438: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(location, &value, sizeof(double)); data/box2d-2.4.1/extern/sajson/sajson.h:875: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 formatted_error_message[ERROR_BUFFER_LENGTH]; data/box2d-2.4.1/extern/sajson/sajson.h:1179: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(new_stack, stack_bottom, current_size * sizeof(size_t)); data/box2d-2.4.1/extern/sajson/sajson.h:1290: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(ast_write_head, old_write_head, current_size * sizeof(size_t)); data/box2d-2.4.1/include/box2d/b2_growable_stack.h:60:4: [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(m_stack, old, m_count * sizeof(T)); data/box2d-2.4.1/include/box2d/b2_stack_allocator.h:55:2: [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 m_data[b2_stackSize]; data/box2d-2.4.1/src/collision/b2_broad_phase.cpp:81:3: [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(m_moveBuffer, oldBuffer, m_moveCount * sizeof(int32)); data/box2d-2.4.1/src/collision/b2_broad_phase.cpp:122:3: [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(m_pairBuffer, oldBuffer, m_pairCount * sizeof(b2Pair)); data/box2d-2.4.1/src/collision/b2_chain_shape.cpp:62:2: [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(m_vertices, vertices, count * sizeof(b2Vec2)); data/box2d-2.4.1/src/collision/b2_chain_shape.cpp:80:2: [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(m_vertices, vertices, m_count * sizeof(b2Vec2)); data/box2d-2.4.1/src/collision/b2_dynamic_tree.cpp:65:3: [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(m_nodes, oldNodes, m_nodeCount * sizeof(b2TreeNode)); data/box2d-2.4.1/src/common/b2_block_allocator.cpp:141:4: [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(m_chunks, oldChunks, m_chunkCount * sizeof(b2Chunk)); data/box2d-2.4.1/src/common/b2_settings.cpp:54:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). b2_dumpFile = fopen(fileName, "w"); data/box2d-2.4.1/testbed/imgui_impl_opengl3.cpp:97:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char g_GlslVersionString[32] = ""; data/box2d-2.4.1/testbed/main.cpp:94:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* file1 = fopen(fontPath1, "rb"); data/box2d-2.4.1/testbed/main.cpp:95:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* file2 = fopen(fontPath2, "rb"); data/box2d-2.4.1/testbed/main.cpp:487:2: [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/box2d-2.4.1/testbed/main.cpp:514:2: [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(buffer, "Box2D Testbed Version %d.%d.%d", b2_version.major, b2_version.minor, b2_version.revision); data/box2d-2.4.1/testbed/main.cpp:602:4: [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(buffer, "%.1f ms", 1000.0 * frameTime.count()); data/box2d-2.4.1/testbed/settings.cpp:33:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* file = fopen(filename, "rb"); data/box2d-2.4.1/testbed/settings.cpp:58:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* file = fopen(fileName, "w"); data/box2d-2.4.1/unit-test/doctest.h:458: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[len]; data/box2d-2.4.1/unit-test/doctest.h:760: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. typedef char yes[2]; data/box2d-2.4.1/unit-test/doctest.h:2839:65: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. void my_memcpy(void* dest, const void* src, unsigned num) { memcpy(dest, src, num); } data/box2d-2.4.1/unit-test/doctest.h:3016: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, other.buf, len); data/box2d-2.4.1/unit-test/doctest.h:3022: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(data.ptr, other.data.ptr, data.size + 1); data/box2d-2.4.1/unit-test/doctest.h:3042: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, in, in_size + 1); data/box2d-2.4.1/unit-test/doctest.h:3049: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(data.ptr, in, in_size + 1); data/box2d-2.4.1/unit-test/doctest.h:3074: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(buf + my_old_size, other.c_str(), other_size + 1); data/box2d-2.4.1/unit-test/doctest.h:3080: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(temp, buf, my_old_size); // skip the +1 ('\0') for speed data/box2d-2.4.1/unit-test/doctest.h:3087: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(data.ptr + my_old_size, other.c_str(), other_size + 1); data/box2d-2.4.1/unit-test/doctest.h:3093: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(data.ptr + my_old_size, other.c_str(), other_size + 1); data/box2d-2.4.1/unit-test/doctest.h:3102: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(temp, data.ptr, my_old_size); // skip the +1 ('\0') for speed data/box2d-2.4.1/unit-test/doctest.h:3109: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(data.ptr + my_old_size, other.c_str(), other_size + 1); data/box2d-2.4.1/unit-test/doctest.h:3120: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, other.buf, len); data/box2d-2.4.1/unit-test/doctest.h:3130: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, other.buf, len); data/box2d-2.4.1/unit-test/doctest.h:3306: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/box2d-2.4.1/unit-test/doctest.h:4021: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. static char altStackMem[4 * SIGSTKSZ]; data/box2d-2.4.1/unit-test/doctest.h:5488:31: [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). int theInt = std::atoi(parsedValue.c_str()); // NOLINT data/box2d-2.4.1/unit-test/doctest.h:5686:14: [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). fstr.open(p->out.c_str(), std::fstream::out); data/box2d-2.4.1/extern/glad/src/gl.c:800: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/box2d-2.4.1/extern/glad/src/gl.c:840: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/box2d-2.4.1/extern/glad/src/gl.c:888: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/box2d-2.4.1/extern/glfw/src/context.c:395: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/box2d-2.4.1/extern/glfw/src/context.c:593: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/box2d-2.4.1/extern/glfw/src/init.c:116: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/box2d-2.4.1/extern/glfw/src/input.c:175: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/box2d-2.4.1/extern/glfw/src/input.c:230: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:172: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:231: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:353: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/box2d-2.4.1/extern/glfw/src/linux_joystick.c:399: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/box2d-2.4.1/extern/glfw/src/window.c:428: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/box2d-2.4.1/extern/glfw/src/window.c:432: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/box2d-2.4.1/extern/glfw/src/window.c:436: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/box2d-2.4.1/extern/glfw/src/wl_window.c:168: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/box2d-2.4.1/extern/glfw/src/wl_window.c:852: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/box2d-2.4.1/extern/glfw/src/wl_window.c:864: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/box2d-2.4.1/extern/glfw/src/wl_window.c:1675: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/box2d-2.4.1/extern/glfw/src/wl_window.c:1752: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/box2d-2.4.1/extern/glfw/src/x11_window.c:396: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/box2d-2.4.1/extern/glfw/src/x11_window.c:398: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/box2d-2.4.1/extern/glfw/src/x11_window.c:406: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/box2d-2.4.1/extern/glfw/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). if (strlen(wndconfig->x11.instanceName) && data/box2d-2.4.1/extern/glfw/src/x11_window.c:739: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/box2d-2.4.1/extern/glfw/src/x11_window.c:747: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/box2d-2.4.1/extern/glfw/src/x11_window.c:749: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/box2d-2.4.1/extern/glfw/src/x11_window.c:754: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/box2d-2.4.1/extern/glfw/src/x11_window.c:865: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/box2d-2.4.1/extern/glfw/src/x11_window.c:917: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/box2d-2.4.1/extern/glfw/src/x11_window.c:2073: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/box2d-2.4.1/extern/glfw/src/x11_window.c:2078: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/box2d-2.4.1/extern/imgui/imgui.cpp:1281:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, src, count); data/box2d-2.4.1/extern/imgui/imgui.cpp:1287:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(str); data/box2d-2.4.1/extern/imgui/imgui.cpp:1294:54: [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 dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1; data/box2d-2.4.1/extern/imgui/imgui.cpp:1295: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). size_t src_size = strlen(src) + 1; data/box2d-2.4.1/extern/imgui/imgui.cpp:1337: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). needle_end = needle + strlen(needle); data/box2d-2.4.1/extern/imgui/imgui.cpp:2017:46: [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). TextRange input_range(InputBuf, InputBuf+strlen(InputBuf)); data/box2d-2.4.1/extern/imgui/imgui.cpp:2238: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). text_end = text + strlen(text); // FIXME-OPT data/box2d-2.4.1/extern/imgui/imgui.cpp:2256: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). text_end = text + strlen(text); // FIXME-OPT data/box2d-2.4.1/extern/imgui/imgui.cpp:2447: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). NameBufLen = (int)strlen(name) + 1; data/box2d-2.4.1/extern/imgui/imgui.cpp:8455:15: [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). IM_ASSERT(strlen(type) < IM_ARRAYSIZE(payload.DataType) && "Payload type can be at most 32 characters long"); data/box2d-2.4.1/extern/imgui/imgui.cpp:8848:20: [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). ini_size = strlen(ini_data); data/box2d-2.4.1/extern/imgui/imgui.cpp:9071: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). const char* text_end = text + strlen(text); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:2816:130: [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). ImGui::LogText("colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 23 - (int)strlen(name), "", col.x, col.y, col.z, col.w); data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3089:85: [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). static char* Strdup(const char *str) { size_t len = strlen(str) + 1; void* buff = malloc(len); return (char*)memcpy(buff, (const void*)str, len); } data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3090:94: [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). static void Strtrim(char* str) { char* str_end = str + strlen(str); while (str_end > str && str_end[-1] == ' ') str_end--; *str_end = 0; } data/box2d-2.4.1/extern/imgui/imgui_demo.cpp:3203:13: [1] (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 character. strcpy(s, ""); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1174: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). text_end = text_begin + strlen(text_begin); data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1612: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). for (p = filename + strlen(filename); p > filename && p[-1] != '/' && p[-1] != '\\'; p--) {} data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:1646:38: [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). int compressed_ttf_size = (((int)strlen(compressed_ttf_data_base85) + 4) / 5) * 4; data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:2555: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). text_end = text_begin + strlen(text_begin); // FIXME-OPT: Need to avoid this. data/box2d-2.4.1/extern/imgui/imgui_draw.cpp:2663: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). text_end = text_begin + strlen(text_begin); // ImGui functions generally already provides a valid text_end, so this is merely to handle direct calls. data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:129: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). text_end = text + strlen(text); // FIXME-OPT data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1395:14: [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). p += strlen(p) + 1; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:1460:14: [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). p += strlen(p) + 1; data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3028:83: [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 int new_text_len = new_text_end ? (int)(new_text_end - new_text) : (int)strlen(new_text); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3214:43: [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 int init_buf_len = (int)strlen(buf); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3429: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). const int clipboard_len = (int)strlen(clipboard); data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3540:68: [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). IM_ASSERT(callback_data.BufTextLen == (int)strlen(callback_data.Buf)); // You need to maintain BufTextLen if you change the text! data/box2d-2.4.1/extern/imgui/imgui_widgets.cpp:3760:37: [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). buf_end = buf_display + strlen(buf_display); data/box2d-2.4.1/extern/imgui/imstb_truetype.h:477: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). #define STBTT_strlen(x) strlen(x) data/box2d-2.4.1/extern/imgui/imstb_truetype.h:4243:12: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. static int equal(float *a, float *b) data/box2d-2.4.1/extern/imgui/imstb_truetype.h:4292:17: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal(q0,q1) || equal(q1,q2)) { data/box2d-2.4.1/extern/imgui/imstb_truetype.h:4292:33: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal(q0,q1) || equal(q1,q2)) { data/box2d-2.4.1/testbed/imgui_impl_opengl3.cpp:118:20: [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). IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(g_GlslVersionString)); data/box2d-2.4.1/testbed/imgui_impl_opengl3.cpp:120:5: [1] (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 character. strcat(g_GlslVersionString, "\n"); data/box2d-2.4.1/unit-test/doctest.h:3037: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). : String(in, strlen(in)) {} data/box2d-2.4.1/unit-test/doctest.h:4978:54: [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). int sizePrefixDisplay = static_cast<int>(strlen(DOCTEST_OPTIONS_PREFIX_DISPLAY)); data/box2d-2.4.1/unit-test/doctest.h:5387: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). if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue data/box2d-2.4.1/unit-test/doctest.h:5387: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). if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue data/box2d-2.4.1/unit-test/doctest.h:5400: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). temp += strlen(pattern); data/box2d-2.4.1/unit-test/doctest.h:5401:46: [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 unsigned len = strlen(temp); data/box2d-2.4.1/unit-test/doctest.h:5423: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). if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value)) data/box2d-2.4.1/unit-test/doctest.h:5444:20: [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(pch)) ANALYSIS SUMMARY: Hits = 391 Lines analyzed = 112860 in approximately 2.80 seconds (40324 lines/second) Physical Source Lines of Code (SLOC) = 77688 Hits@level = [0] 58 [1] 75 [2] 260 [3] 12 [4] 44 [5] 0 Hits@level+ = [0+] 449 [1+] 391 [2+] 316 [3+] 56 [4+] 44 [5+] 0 Hits/KSLOC@level+ = [0+] 5.77953 [1+] 5.03295 [2+] 4.06755 [3+] 0.720832 [4+] 0.566368 [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.