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/wlroots-0.11.0/backend/backend.c Examining data/wlroots-0.11.0/backend/drm/atomic.c Examining data/wlroots-0.11.0/backend/drm/backend.c Examining data/wlroots-0.11.0/backend/drm/cvt.c Examining data/wlroots-0.11.0/backend/drm/drm.c Examining data/wlroots-0.11.0/backend/drm/legacy.c Examining data/wlroots-0.11.0/backend/drm/properties.c Examining data/wlroots-0.11.0/backend/drm/renderer.c Examining data/wlroots-0.11.0/backend/drm/util.c Examining data/wlroots-0.11.0/backend/headless/backend.c Examining data/wlroots-0.11.0/backend/headless/input_device.c Examining data/wlroots-0.11.0/backend/headless/output.c Examining data/wlroots-0.11.0/backend/libinput/backend.c Examining data/wlroots-0.11.0/backend/libinput/events.c Examining data/wlroots-0.11.0/backend/libinput/keyboard.c Examining data/wlroots-0.11.0/backend/libinput/pointer.c Examining data/wlroots-0.11.0/backend/libinput/switch.c Examining data/wlroots-0.11.0/backend/libinput/tablet_pad.c Examining data/wlroots-0.11.0/backend/libinput/tablet_tool.c Examining data/wlroots-0.11.0/backend/libinput/touch.c Examining data/wlroots-0.11.0/backend/multi/backend.c Examining data/wlroots-0.11.0/backend/noop/backend.c Examining data/wlroots-0.11.0/backend/noop/output.c Examining data/wlroots-0.11.0/backend/session/direct-freebsd.c Examining data/wlroots-0.11.0/backend/session/direct-ipc.c Examining data/wlroots-0.11.0/backend/session/direct.c Examining data/wlroots-0.11.0/backend/session/logind.c Examining data/wlroots-0.11.0/backend/session/noop.c Examining data/wlroots-0.11.0/backend/session/session.c Examining data/wlroots-0.11.0/backend/wayland/backend.c Examining data/wlroots-0.11.0/backend/wayland/output.c Examining data/wlroots-0.11.0/backend/wayland/seat.c Examining data/wlroots-0.11.0/backend/wayland/tablet_v2.c Examining data/wlroots-0.11.0/backend/x11/backend.c Examining data/wlroots-0.11.0/backend/x11/input_device.c Examining data/wlroots-0.11.0/backend/x11/output.c Examining data/wlroots-0.11.0/examples/cat.c Examining data/wlroots-0.11.0/examples/cat.h Examining data/wlroots-0.11.0/examples/dmabuf-capture.c Examining data/wlroots-0.11.0/examples/foreign-toplevel.c Examining data/wlroots-0.11.0/examples/fullscreen-shell.c Examining data/wlroots-0.11.0/examples/gamma-control.c Examining data/wlroots-0.11.0/examples/idle-inhibit.c Examining data/wlroots-0.11.0/examples/idle.c Examining data/wlroots-0.11.0/examples/input-inhibitor.c Examining data/wlroots-0.11.0/examples/input-method-keyboard-grab.c Examining data/wlroots-0.11.0/examples/input-method.c Examining data/wlroots-0.11.0/examples/keyboard-shortcuts-inhibit.c Examining data/wlroots-0.11.0/examples/layer-shell.c Examining data/wlroots-0.11.0/examples/multi-pointer.c Examining data/wlroots-0.11.0/examples/output-layout.c Examining data/wlroots-0.11.0/examples/output-power-management.c Examining data/wlroots-0.11.0/examples/pointer-constraints.c Examining data/wlroots-0.11.0/examples/pointer.c Examining data/wlroots-0.11.0/examples/relative-pointer-unstable-v1.c Examining data/wlroots-0.11.0/examples/rotation.c Examining data/wlroots-0.11.0/examples/screencopy-dmabuf.c Examining data/wlroots-0.11.0/examples/screencopy.c Examining data/wlroots-0.11.0/examples/simple.c Examining data/wlroots-0.11.0/examples/tablet.c Examining data/wlroots-0.11.0/examples/text-input.c Examining data/wlroots-0.11.0/examples/toplevel-decoration.c Examining data/wlroots-0.11.0/examples/touch.c Examining data/wlroots-0.11.0/examples/virtual-pointer.c Examining data/wlroots-0.11.0/include/backend/drm/cvt.h Examining data/wlroots-0.11.0/include/backend/drm/drm.h Examining data/wlroots-0.11.0/include/backend/drm/iface.h Examining data/wlroots-0.11.0/include/backend/drm/properties.h Examining data/wlroots-0.11.0/include/backend/drm/renderer.h Examining data/wlroots-0.11.0/include/backend/drm/util.h Examining data/wlroots-0.11.0/include/backend/headless.h Examining data/wlroots-0.11.0/include/backend/libinput.h Examining data/wlroots-0.11.0/include/backend/multi.h Examining data/wlroots-0.11.0/include/backend/noop.h Examining data/wlroots-0.11.0/include/backend/session/direct-ipc.h Examining data/wlroots-0.11.0/include/backend/wayland.h Examining data/wlroots-0.11.0/include/backend/x11.h Examining data/wlroots-0.11.0/include/render/gles2.h Examining data/wlroots-0.11.0/include/types/wlr_data_device.h Examining data/wlroots-0.11.0/include/types/wlr_keyboard.h Examining data/wlroots-0.11.0/include/types/wlr_seat.h Examining data/wlroots-0.11.0/include/types/wlr_tablet_v2.h Examining data/wlroots-0.11.0/include/types/wlr_xdg_shell.h Examining data/wlroots-0.11.0/include/types/wlr_xdg_shell_v6.h Examining data/wlroots-0.11.0/include/util/array.h Examining data/wlroots-0.11.0/include/util/global.h Examining data/wlroots-0.11.0/include/util/shm.h Examining data/wlroots-0.11.0/include/util/signal.h Examining data/wlroots-0.11.0/include/util/time.h Examining data/wlroots-0.11.0/include/wlr/backend.h Examining data/wlroots-0.11.0/include/wlr/backend/drm.h Examining data/wlroots-0.11.0/include/wlr/backend/headless.h Examining data/wlroots-0.11.0/include/wlr/backend/interface.h Examining data/wlroots-0.11.0/include/wlr/backend/libinput.h Examining data/wlroots-0.11.0/include/wlr/backend/multi.h Examining data/wlroots-0.11.0/include/wlr/backend/noop.h Examining data/wlroots-0.11.0/include/wlr/backend/session.h Examining data/wlroots-0.11.0/include/wlr/backend/session/interface.h Examining data/wlroots-0.11.0/include/wlr/backend/wayland.h Examining data/wlroots-0.11.0/include/wlr/backend/x11.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_input_device.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_keyboard.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_output.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_pointer.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_switch.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_tablet_pad.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_tablet_tool.h Examining data/wlroots-0.11.0/include/wlr/interfaces/wlr_touch.h Examining data/wlroots-0.11.0/include/wlr/render/dmabuf.h Examining data/wlroots-0.11.0/include/wlr/render/drm_format_set.h Examining data/wlroots-0.11.0/include/wlr/render/egl.h Examining data/wlroots-0.11.0/include/wlr/render/gles2.h Examining data/wlroots-0.11.0/include/wlr/render/interface.h Examining data/wlroots-0.11.0/include/wlr/render/wlr_renderer.h Examining data/wlroots-0.11.0/include/wlr/render/wlr_texture.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_box.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_buffer.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_compositor.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_cursor.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_data_control_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_data_device.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_export_dmabuf_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_foreign_toplevel_management_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_fullscreen_shell_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_gamma_control_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_gtk_primary_selection.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_idle.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_idle_inhibit_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_input_device.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_input_inhibitor.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_input_method_v2.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_keyboard.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_keyboard_group.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_layer_shell_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_linux_dmabuf_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_list.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_matrix.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_output.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_output_damage.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_output_layout.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_output_management_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_output_power_management_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_pointer.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_pointer_constraints_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_pointer_gestures_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_presentation_time.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_primary_selection.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_primary_selection_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_region.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_relative_pointer_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_screencopy_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_seat.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_server_decoration.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_surface.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_switch.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_tablet_pad.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_tablet_tool.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_tablet_v2.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_text_input_v3.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_touch.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_viewporter.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_virtual_keyboard_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_virtual_pointer_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_xcursor_manager.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_xdg_decoration_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_xdg_output_v1.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_xdg_shell.h Examining data/wlroots-0.11.0/include/wlr/types/wlr_xdg_shell_v6.h Examining data/wlroots-0.11.0/include/wlr/util/edges.h Examining data/wlroots-0.11.0/include/wlr/util/log.h Examining data/wlroots-0.11.0/include/wlr/util/region.h Examining data/wlroots-0.11.0/include/wlr/xcursor.h Examining data/wlroots-0.11.0/include/wlr/xwayland.h Examining data/wlroots-0.11.0/include/xcursor/cursor_data.h Examining data/wlroots-0.11.0/include/xcursor/xcursor.h Examining data/wlroots-0.11.0/include/xwayland/selection.h Examining data/wlroots-0.11.0/include/xwayland/xwm.h Examining data/wlroots-0.11.0/render/dmabuf.c Examining data/wlroots-0.11.0/render/drm_format_set.c Examining data/wlroots-0.11.0/render/egl.c Examining data/wlroots-0.11.0/render/gles2/pixel_format.c Examining data/wlroots-0.11.0/render/gles2/renderer.c Examining data/wlroots-0.11.0/render/gles2/shaders.c Examining data/wlroots-0.11.0/render/gles2/texture.c Examining data/wlroots-0.11.0/render/wlr_renderer.c Examining data/wlroots-0.11.0/render/wlr_texture.c Examining data/wlroots-0.11.0/tinywl/tinywl.c Examining data/wlroots-0.11.0/types/data_device/wlr_data_device.c Examining data/wlroots-0.11.0/types/data_device/wlr_data_offer.c Examining data/wlroots-0.11.0/types/data_device/wlr_data_source.c Examining data/wlroots-0.11.0/types/data_device/wlr_drag.c Examining data/wlroots-0.11.0/types/seat/wlr_seat.c Examining data/wlroots-0.11.0/types/seat/wlr_seat_keyboard.c Examining data/wlroots-0.11.0/types/seat/wlr_seat_pointer.c Examining data/wlroots-0.11.0/types/seat/wlr_seat_touch.c Examining data/wlroots-0.11.0/types/tablet_v2/wlr_tablet_v2.c Examining data/wlroots-0.11.0/types/tablet_v2/wlr_tablet_v2_pad.c Examining data/wlroots-0.11.0/types/tablet_v2/wlr_tablet_v2_tablet.c Examining data/wlroots-0.11.0/types/tablet_v2/wlr_tablet_v2_tool.c Examining data/wlroots-0.11.0/types/wlr_box.c Examining data/wlroots-0.11.0/types/wlr_buffer.c Examining data/wlroots-0.11.0/types/wlr_compositor.c Examining data/wlroots-0.11.0/types/wlr_cursor.c Examining data/wlroots-0.11.0/types/wlr_data_control_v1.c Examining data/wlroots-0.11.0/types/wlr_export_dmabuf_v1.c Examining data/wlroots-0.11.0/types/wlr_foreign_toplevel_management_v1.c Examining data/wlroots-0.11.0/types/wlr_fullscreen_shell_v1.c Examining data/wlroots-0.11.0/types/wlr_gamma_control_v1.c Examining data/wlroots-0.11.0/types/wlr_gtk_primary_selection.c Examining data/wlroots-0.11.0/types/wlr_idle.c Examining data/wlroots-0.11.0/types/wlr_idle_inhibit_v1.c Examining data/wlroots-0.11.0/types/wlr_input_device.c Examining data/wlroots-0.11.0/types/wlr_input_inhibitor.c Examining data/wlroots-0.11.0/types/wlr_input_method_v2.c Examining data/wlroots-0.11.0/types/wlr_keyboard.c Examining data/wlroots-0.11.0/types/wlr_keyboard_group.c Examining data/wlroots-0.11.0/types/wlr_keyboard_shortcuts_inhibit_v1.c Examining data/wlroots-0.11.0/types/wlr_layer_shell_v1.c Examining data/wlroots-0.11.0/types/wlr_linux_dmabuf_v1.c Examining data/wlroots-0.11.0/types/wlr_list.c Examining data/wlroots-0.11.0/types/wlr_matrix.c Examining data/wlroots-0.11.0/types/wlr_output.c Examining data/wlroots-0.11.0/types/wlr_output_damage.c Examining data/wlroots-0.11.0/types/wlr_output_layout.c Examining data/wlroots-0.11.0/types/wlr_output_power_management_v1.c Examining data/wlroots-0.11.0/types/wlr_pointer.c Examining data/wlroots-0.11.0/types/wlr_pointer_constraints_v1.c Examining data/wlroots-0.11.0/types/wlr_pointer_gestures_v1.c Examining data/wlroots-0.11.0/types/wlr_presentation_time.c Examining data/wlroots-0.11.0/types/wlr_primary_selection.c Examining data/wlroots-0.11.0/types/wlr_primary_selection_v1.c Examining data/wlroots-0.11.0/types/wlr_region.c Examining data/wlroots-0.11.0/types/wlr_relative_pointer_v1.c Examining data/wlroots-0.11.0/types/wlr_screencopy_v1.c Examining data/wlroots-0.11.0/types/wlr_server_decoration.c Examining data/wlroots-0.11.0/types/wlr_surface.c Examining data/wlroots-0.11.0/types/wlr_switch.c Examining data/wlroots-0.11.0/types/wlr_tablet_pad.c Examining data/wlroots-0.11.0/types/wlr_tablet_tool.c Examining data/wlroots-0.11.0/types/wlr_text_input_v3.c Examining data/wlroots-0.11.0/types/wlr_touch.c Examining data/wlroots-0.11.0/types/wlr_viewporter.c Examining data/wlroots-0.11.0/types/wlr_virtual_keyboard_v1.c Examining data/wlroots-0.11.0/types/wlr_virtual_pointer_v1.c Examining data/wlroots-0.11.0/types/wlr_xcursor_manager.c Examining data/wlroots-0.11.0/types/wlr_xdg_decoration_v1.c Examining data/wlroots-0.11.0/types/wlr_xdg_output_v1.c Examining data/wlroots-0.11.0/types/xdg_shell/wlr_xdg_popup.c Examining data/wlroots-0.11.0/types/xdg_shell/wlr_xdg_positioner.c Examining data/wlroots-0.11.0/types/xdg_shell/wlr_xdg_shell.c Examining data/wlroots-0.11.0/types/xdg_shell/wlr_xdg_surface.c Examining data/wlroots-0.11.0/types/xdg_shell/wlr_xdg_toplevel.c Examining data/wlroots-0.11.0/types/xdg_shell_v6/wlr_xdg_popup_v6.c Examining data/wlroots-0.11.0/types/xdg_shell_v6/wlr_xdg_positioner_v6.c Examining data/wlroots-0.11.0/types/xdg_shell_v6/wlr_xdg_shell_v6.c Examining data/wlroots-0.11.0/types/xdg_shell_v6/wlr_xdg_surface_v6.c Examining data/wlroots-0.11.0/types/xdg_shell_v6/wlr_xdg_toplevel_v6.c Examining data/wlroots-0.11.0/types/wlr_output_management_v1.c Examining data/wlroots-0.11.0/util/array.c Examining data/wlroots-0.11.0/util/global.c Examining data/wlroots-0.11.0/util/log.c Examining data/wlroots-0.11.0/util/region.c Examining data/wlroots-0.11.0/util/shm.c Examining data/wlroots-0.11.0/util/signal.c Examining data/wlroots-0.11.0/util/time.c Examining data/wlroots-0.11.0/xcursor/wlr_xcursor.c Examining data/wlroots-0.11.0/xcursor/xcursor.c Examining data/wlroots-0.11.0/xwayland/selection/dnd.c Examining data/wlroots-0.11.0/xwayland/selection/incoming.c Examining data/wlroots-0.11.0/xwayland/selection/outgoing.c Examining data/wlroots-0.11.0/xwayland/selection/selection.c Examining data/wlroots-0.11.0/xwayland/server.c Examining data/wlroots-0.11.0/xwayland/sockets.c Examining data/wlroots-0.11.0/xwayland/sockets.h Examining data/wlroots-0.11.0/xwayland/xwayland.c Examining data/wlroots-0.11.0/xwayland/xwm.c Examining data/wlroots-0.11.0/debian/tests/test.c FINAL RESULTS: data/wlroots-0.11.0/backend/drm/drm.c:1298:4: [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. snprintf(wlr_conn->output.name, sizeof(wlr_conn->output.name), data/wlroots-0.11.0/backend/session/direct-freebsd.c:149:2: [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(path, prefix); data/wlroots-0.11.0/backend/x11/output.c:32:2: [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. snprintf(output->model, sizeof(output->model), "%"PRIu16".%"PRIu16, data/wlroots-0.11.0/examples/fullscreen-shell.c:237:4: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "/bin/sh", "-c", startup_cmd, (void *)NULL); data/wlroots-0.11.0/examples/gamma-control.c:152:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, usage); data/wlroots-0.11.0/examples/input-method.c:314:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(usage); data/wlroots-0.11.0/examples/output-power-management.c:99:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, usage); data/wlroots-0.11.0/examples/text-input.c:254:2: [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(buffer, old_buffer); data/wlroots-0.11.0/examples/text-input.c:256:2: [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(buffer, commit_string); data/wlroots-0.11.0/examples/text-input.c:327:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(usage); data/wlroots-0.11.0/include/wlr/util/log.h:46:62: [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 _WLR_ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) data/wlroots-0.11.0/tinywl/tinywl.c:963:4: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "/bin/sh", "-c", startup_cmd, (void *)NULL); data/wlroots-0.11.0/types/seat/wlr_seat_keyboard.c:382:3: [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(ptr, keyboard->keymap_string); data/wlroots-0.11.0/util/log.c:62: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(stderr, fmt, args); data/wlroots-0.11.0/xcursor/xcursor.c:273: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 (new, name); data/wlroots-0.11.0/xwayland/server.c:31:8: [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. len = vsnprintf(NULL, 0, fmt, args) + 1; data/wlroots-0.11.0/xwayland/server.c:42:8: [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. len = vsnprintf(*cur_arg, len, fmt, args); data/wlroots-0.11.0/xwayland/server.c:111:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp("Xwayland", argv); data/wlroots-0.11.0/xwayland/sockets.c:95:14: [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. path_size = snprintf(addr.sun_path + 1, sizeof(addr.sun_path) - 1, socket_fmt, display); data/wlroots-0.11.0/xwayland/sockets.c:97:14: [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. path_size = snprintf(addr.sun_path, sizeof(addr.sun_path), socket_fmt2, display); data/wlroots-0.11.0/xwayland/sockets.c:104:14: [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. path_size = snprintf(addr.sun_path, sizeof(addr.sun_path), socket_fmt, display); data/wlroots-0.11.0/xwayland/sockets.c:118:2: [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. snprintf(sun_path, sizeof(sun_path), socket_fmt, display); data/wlroots-0.11.0/xwayland/sockets.c:122:2: [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. snprintf(sun_path, sizeof(sun_path), socket_fmt2, display); data/wlroots-0.11.0/xwayland/sockets.c:126:2: [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. snprintf(sun_path, sizeof(sun_path), lock_fmt, display); data/wlroots-0.11.0/xwayland/sockets.c:135:3: [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. snprintf(lock_name, sizeof(lock_name), lock_fmt, display); data/wlroots-0.11.0/backend/backend.c:75:28: [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 *outputs_str = getenv(name); data/wlroots-0.11.0/backend/backend.c:220:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *names = getenv("WLR_BACKENDS"); data/wlroots-0.11.0/backend/backend.c:257:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("WAYLAND_DISPLAY") || getenv("_WAYLAND_DISPLAY") || data/wlroots-0.11.0/backend/backend.c:257:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("WAYLAND_DISPLAY") || getenv("_WAYLAND_DISPLAY") || data/wlroots-0.11.0/backend/backend.c:258:4: [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. getenv("WAYLAND_SOCKET")) { data/wlroots-0.11.0/backend/backend.c:270:28: [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 *x11_display = getenv("DISPLAY"); data/wlroots-0.11.0/backend/drm/drm.c:60:26: [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 *no_atomic = getenv("WLR_DRM_NO_ATOMIC"); data/wlroots-0.11.0/backend/drm/drm.c:705:29: [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 *no_modifiers = getenv("WLR_DRM_NO_MODIFIERS"); data/wlroots-0.11.0/backend/libinput/backend.c:75: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. char *no_devs = getenv("WLR_LIBINPUT_NO_DEVICES"); data/wlroots-0.11.0/backend/session/direct-freebsd.c:282:21: [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 *seat = getenv("XDG_SEAT"); data/wlroots-0.11.0/backend/session/direct.c:161: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. const char *tty_path = getenv("WLR_DIRECT_TTY"); data/wlroots-0.11.0/backend/session/direct.c:254:21: [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 *seat = getenv("XDG_SEAT"); data/wlroots-0.11.0/backend/session/logind.c:670: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. char *xdg_session_id = getenv("XDG_SESSION_ID"); data/wlroots-0.11.0/backend/session/session.c:71:32: [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 *env_wlr_session = getenv("WLR_SESSION"); data/wlroots-0.11.0/backend/session/session.c:286: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. const char *explicit = getenv("WLR_DRM_DEVICES"); data/wlroots-0.11.0/examples/dmabuf-capture.c:792:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "ho:t:d:e:f:r:")) != -1) { data/wlroots-0.11.0/examples/foreign-toplevel.c:295:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "f:a:u:i:r:c:s:S:m")) != -1) { data/wlroots-0.11.0/examples/fullscreen-shell.c:189:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "s:")) != -1) { data/wlroots-0.11.0/examples/gamma-control.c:139:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "hc:b:g:")) != -1) { data/wlroots-0.11.0/examples/idle.c:57:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "c:hs:t:")) != -1) { data/wlroots-0.11.0/examples/layer-shell.c:481:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "knw:h:o:l:a:x:m:t:")) != -1) { data/wlroots-0.11.0/examples/multi-pointer.c:214:17: [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. rules.rules = getenv("XKB_DEFAULT_RULES"); data/wlroots-0.11.0/examples/multi-pointer.c:215:17: [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. rules.model = getenv("XKB_DEFAULT_MODEL"); data/wlroots-0.11.0/examples/multi-pointer.c:216: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. rules.layout = getenv("XKB_DEFAULT_LAYOUT"); data/wlroots-0.11.0/examples/multi-pointer.c:217:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.variant = getenv("XKB_DEFAULT_VARIANT"); data/wlroots-0.11.0/examples/multi-pointer.c:218:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.options = getenv("XKB_DEFAULT_OPTIONS"); data/wlroots-0.11.0/examples/output-layout.c:232:17: [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. rules.rules = getenv("XKB_DEFAULT_RULES"); data/wlroots-0.11.0/examples/output-layout.c:233:17: [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. rules.model = getenv("XKB_DEFAULT_MODEL"); data/wlroots-0.11.0/examples/output-layout.c:234: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. rules.layout = getenv("XKB_DEFAULT_LAYOUT"); data/wlroots-0.11.0/examples/output-layout.c:235:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.variant = getenv("XKB_DEFAULT_VARIANT"); data/wlroots-0.11.0/examples/output-layout.c:236:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.options = getenv("XKB_DEFAULT_OPTIONS"); data/wlroots-0.11.0/examples/output-power-management.c:86:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "edhw")) != -1) { data/wlroots-0.11.0/examples/pointer.c:299:17: [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. rules.rules = getenv("XKB_DEFAULT_RULES"); data/wlroots-0.11.0/examples/pointer.c:300:17: [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. rules.model = getenv("XKB_DEFAULT_MODEL"); data/wlroots-0.11.0/examples/pointer.c:301: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. rules.layout = getenv("XKB_DEFAULT_LAYOUT"); data/wlroots-0.11.0/examples/pointer.c:302:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.variant = getenv("XKB_DEFAULT_VARIANT"); data/wlroots-0.11.0/examples/pointer.c:303:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.options = getenv("XKB_DEFAULT_OPTIONS"); data/wlroots-0.11.0/examples/rotation.c:182:17: [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. rules.rules = getenv("XKB_DEFAULT_RULES"); data/wlroots-0.11.0/examples/rotation.c:183:17: [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. rules.model = getenv("XKB_DEFAULT_MODEL"); data/wlroots-0.11.0/examples/rotation.c:184: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. rules.layout = getenv("XKB_DEFAULT_LAYOUT"); data/wlroots-0.11.0/examples/rotation.c:185:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.variant = getenv("XKB_DEFAULT_VARIANT"); data/wlroots-0.11.0/examples/rotation.c:186:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.options = getenv("XKB_DEFAULT_OPTIONS"); data/wlroots-0.11.0/examples/rotation.c:211:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "r:")) != -1) { data/wlroots-0.11.0/examples/simple.c:136:17: [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. rules.rules = getenv("XKB_DEFAULT_RULES"); data/wlroots-0.11.0/examples/simple.c:137:17: [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. rules.model = getenv("XKB_DEFAULT_MODEL"); data/wlroots-0.11.0/examples/simple.c:138: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. rules.layout = getenv("XKB_DEFAULT_LAYOUT"); data/wlroots-0.11.0/examples/simple.c:139:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.variant = getenv("XKB_DEFAULT_VARIANT"); data/wlroots-0.11.0/examples/simple.c:140:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.options = getenv("XKB_DEFAULT_OPTIONS"); data/wlroots-0.11.0/examples/tablet.c:291:17: [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. rules.rules = getenv("XKB_DEFAULT_RULES"); data/wlroots-0.11.0/examples/tablet.c:292:17: [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. rules.model = getenv("XKB_DEFAULT_MODEL"); data/wlroots-0.11.0/examples/tablet.c:293: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. rules.layout = getenv("XKB_DEFAULT_LAYOUT"); data/wlroots-0.11.0/examples/tablet.c:294:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.variant = getenv("XKB_DEFAULT_VARIANT"); data/wlroots-0.11.0/examples/tablet.c:295:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.options = getenv("XKB_DEFAULT_OPTIONS"); data/wlroots-0.11.0/examples/touch.c:204:17: [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. rules.rules = getenv("XKB_DEFAULT_RULES"); data/wlroots-0.11.0/examples/touch.c:205:17: [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. rules.model = getenv("XKB_DEFAULT_MODEL"); data/wlroots-0.11.0/examples/touch.c:206: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. rules.layout = getenv("XKB_DEFAULT_LAYOUT"); data/wlroots-0.11.0/examples/touch.c:207:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.variant = getenv("XKB_DEFAULT_VARIANT"); data/wlroots-0.11.0/examples/touch.c:208:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. rules.options = getenv("XKB_DEFAULT_OPTIONS"); data/wlroots-0.11.0/tinywl/tinywl.c:822:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "s:h")) != -1) { data/wlroots-0.11.0/types/wlr_output.c:344:36: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *no_hardware_cursors = getenv("WLR_NO_HARDWARE_CURSORS"); data/wlroots-0.11.0/xcursor/xcursor.c:631:9: [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 ("XCURSOR_PATH"); data/wlroots-0.11.0/xcursor/xcursor.c:692:9: [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. home = getenv ("HOME"); data/wlroots-0.11.0/backend/drm/drm.c:340: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(&crtc->current, &crtc->pending, sizeof(struct wlr_drm_crtc_state)); data/wlroots-0.11.0/backend/drm/drm.c:346: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(&crtc->pending, &crtc->current, sizeof(struct wlr_drm_crtc_state)); data/wlroots-0.11.0/backend/drm/drm.c:846: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(&mode->drm_mode, modeinfo, sizeof(*modeinfo)); data/wlroots-0.11.0/backend/drm/drm.c:1362:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[128]; data/wlroots-0.11.0/backend/drm/properties.c:149: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(ptr, blob->data, blob->length); data/wlroots-0.11.0/backend/drm/util.c:127: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(output->model, "%.13s", &data[i + 5]); data/wlroots-0.11.0/backend/drm/util.c:135: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(output->serial, "%.13s", &data[i + 5]); data/wlroots-0.11.0/backend/drm/util.c:266: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(st->best, st->res, sizeof(st->best[0]) * st->num_res); data/wlroots-0.11.0/backend/headless/output.c:204: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 description[128]; data/wlroots-0.11.0/backend/session/direct-freebsd.c:142: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 bool get_tty_path(int tty, char path[static 11], size_t len) { data/wlroots-0.11.0/backend/session/direct-freebsd.c:189:17: [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). if ((tty0_fd = open("/dev/ttyv0", O_RDWR | O_CLOEXEC)) < 0) { data/wlroots-0.11.0/backend/session/direct-freebsd.c:202: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 tty_path[64]; data/wlroots-0.11.0/backend/session/direct-freebsd.c:208:7: [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). fd = open(tty_path, O_RDWR | O_NOCTTY | O_CLOEXEC); data/wlroots-0.11.0/backend/session/direct-ipc.c:38: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 control[CMSG_SPACE(sizeof(fd))] = {0}; data/wlroots-0.11.0/backend/session/direct-ipc.c:57: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(CMSG_DATA(cmsg), &fd, sizeof(fd)); data/wlroots-0.11.0/backend/session/direct-ipc.c:67: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 control[CMSG_SPACE(sizeof(*fd_out))] = {0}; data/wlroots-0.11.0/backend/session/direct-ipc.c:89: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(fd_out, CMSG_DATA(cmsg), sizeof(*fd_out)); data/wlroots-0.11.0/backend/session/direct-ipc.c:107: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 path[256]; data/wlroots-0.11.0/backend/session/direct-ipc.c:121:13: [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). int fd = open(msg.path, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK); data/wlroots-0.11.0/backend/session/direct.c:168:11: [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). int fd = open(tty_path, O_RDWR | O_CLOEXEC); data/wlroots-0.11.0/backend/session/noop.c:14:9: [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). return open(path, O_RDWR | O_CLOEXEC); data/wlroots-0.11.0/backend/session/session.c:160:26: [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). int fd = session->impl->open(session, path); data/wlroots-0.11.0/backend/wayland/output.c:510: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 description[128]; data/wlroots-0.11.0/backend/wayland/output.c:602: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 wl_title[32]; data/wlroots-0.11.0/backend/wayland/seat.c:226: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(pressed, dev->keyboard->keycodes, data/wlroots-0.11.0/backend/wayland/tablet_v2.c:207: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(group->group.buttons, buttons->data, buttons->size); data/wlroots-0.11.0/backend/x11/output.c:202: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 description[128]; data/wlroots-0.11.0/backend/x11/output.c:301: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 wl_title[32]; data/wlroots-0.11.0/examples/cat.h:8: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. unsigned char pixel_data[128 * 128 * 4 + 1]; data/wlroots-0.11.0/examples/foreign-toplevel.c:298:15: [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). focus_id = atoi(optarg); data/wlroots-0.11.0/examples/foreign-toplevel.c:301:18: [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). maximize_id = atoi(optarg); data/wlroots-0.11.0/examples/foreign-toplevel.c:304:20: [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). unmaximize_id = atoi(optarg); data/wlroots-0.11.0/examples/foreign-toplevel.c:307:18: [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). minimize_id = atoi(optarg); data/wlroots-0.11.0/examples/foreign-toplevel.c:310:17: [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). restore_id = atoi(optarg); data/wlroots-0.11.0/examples/foreign-toplevel.c:313:15: [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). close_id = atoi(optarg); data/wlroots-0.11.0/examples/foreign-toplevel.c:316:20: [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). fullscreen_id = atoi(optarg); data/wlroots-0.11.0/examples/foreign-toplevel.c:319:22: [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). unfullscreen_id = atoi(optarg); data/wlroots-0.11.0/examples/gamma-control.c:27:11: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp(template); data/wlroots-0.11.0/examples/input-method-keyboard-grab.c:29: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 keysym_name[64]; data/wlroots-0.11.0/examples/input-method.c:317:15: [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). sleeptime = atoi(argv[1]); data/wlroots-0.11.0/examples/layer-shell.c:484:13: [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). output = atoi(optarg); data/wlroots-0.11.0/examples/layer-shell.c:487:12: [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). width = atoi(optarg); data/wlroots-0.11.0/examples/layer-shell.c:490:13: [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). height = atoi(optarg); data/wlroots-0.11.0/examples/layer-shell.c:493:21: [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). exclusive_zone = atoi(optarg); data/wlroots-0.11.0/examples/pointer.c:137: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(&sample->clear_color, color, sizeof(*color)); data/wlroots-0.11.0/examples/pointer.c:142: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(&sample->clear_color, color, sizeof(*color)); data/wlroots-0.11.0/examples/screencopy-dmabuf.c:250: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). FILE *f = fopen(filename, "wb"); data/wlroots-0.11.0/examples/screencopy-dmabuf.c:290: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 render_node[256]; data/wlroots-0.11.0/examples/screencopy-dmabuf.c:298:11: [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). drm_fd = open(render_node, O_RDWR); data/wlroots-0.11.0/examples/screencopy.c:189: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). FILE *f = fopen(filename, "wb"); data/wlroots-0.11.0/examples/tablet.c:190: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(sample->pad_color, default_color, sizeof(default_color)); data/wlroots-0.11.0/examples/text-input.c:330:15: [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). sleeptime = atoi(argv[1]); data/wlroots-0.11.0/examples/text-input.c:332:12: [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). width = atoi(argv[2]); data/wlroots-0.11.0/examples/text-input.c:333:13: [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). height = atoi(argv[3]); data/wlroots-0.11.0/examples/virtual-pointer.c:96:16: [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). uint32_t x = atoi(argv[2]); data/wlroots-0.11.0/examples/virtual-pointer.c:97:16: [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). uint32_t y = atoi(argv[3]); data/wlroots-0.11.0/examples/virtual-pointer.c:98:23: [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). uint32_t x_extent = atoi(argv[4]); data/wlroots-0.11.0/examples/virtual-pointer.c:99:23: [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). uint32_t y_extent = atoi(argv[5]); data/wlroots-0.11.0/examples/virtual-pointer.c:106:21: [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). uint32_t button = atoi(argv[2]); data/wlroots-0.11.0/examples/virtual-pointer.c:114:19: [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). uint32_t axis = atoi(argv[2]); data/wlroots-0.11.0/examples/virtual-pointer.c:123:19: [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). uint32_t axis = atoi(argv[2]); data/wlroots-0.11.0/examples/virtual-pointer.c:125:23: [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). uint32_t discrete = atoi(argv[4]); data/wlroots-0.11.0/include/wlr/backend/session.h:33: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 seat[256]; data/wlroots-0.11.0/include/wlr/backend/session/interface.h:17:8: [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). int (*open)(struct wlr_session *session, const char *path); data/wlroots-0.11.0/include/wlr/types/wlr_output.h:125: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 name[24]; data/wlroots-0.11.0/include/wlr/types/wlr_output.h:127: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 make[56]; data/wlroots-0.11.0/include/wlr/types/wlr_output.h:128: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 model[16]; data/wlroots-0.11.0/include/wlr/types/wlr_output.h:129: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 serial[16]; data/wlroots-0.11.0/include/wlr/xwayland.h:33: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 display_name[16]; data/wlroots-0.11.0/include/xwayland/xwm.h:86: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. extern const char *atom_map[ATOM_LAST]; data/wlroots-0.11.0/render/dmabuf.c:17: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(dst, src, sizeof(struct wlr_dmabuf_attributes)); data/wlroots-0.11.0/render/egl.c:704: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(*formats, fallback_formats, num * sizeof(**formats)); data/wlroots-0.11.0/render/gles2/renderer.c:549: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 str[len]; data/wlroots-0.11.0/render/wlr_renderer.c:237: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(all_config_attribs, config_attribs, data/wlroots-0.11.0/render/wlr_renderer.c:240: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(&all_config_attribs[config_attribs_len], gles2_config_attribs, data/wlroots-0.11.0/types/tablet_v2/wlr_tablet_v2_pad.c:218: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(button_array.data, group->buttons, group->button_count * sizeof(int)); data/wlroots-0.11.0/types/wlr_buffer.c:132: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(attribs, &dmabuf_buffer->attributes, data/wlroots-0.11.0/types/wlr_input_method_v2.c:186: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(ptr, keyboard->keymap_string, keyboard->keymap_size); data/wlroots-0.11.0/types/wlr_keyboard.c:161: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. const char *led_names[WLR_LED_COUNT] = { data/wlroots-0.11.0/types/wlr_keyboard.c:170: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. const char *mod_names[WLR_MODIFIER_COUNT] = { data/wlroots-0.11.0/types/wlr_matrix.c:14: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(mat, identity, sizeof(identity)); data/wlroots-0.11.0/types/wlr_matrix.c:33: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(mat, product, sizeof(product)); data/wlroots-0.11.0/types/wlr_matrix.c:42: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(mat, transposition, sizeof(transposition)); data/wlroots-0.11.0/types/wlr_output.c:724: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(output->pending.gamma_lut, r, size * sizeof(uint16_t)); data/wlroots-0.11.0/types/wlr_output.c:725: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(output->pending.gamma_lut + size, g, size * sizeof(uint16_t)); data/wlroots-0.11.0/types/wlr_output.c:726: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(output->pending.gamma_lut + 2 * size, b, size * sizeof(uint16_t)); data/wlroots-0.11.0/types/xdg_shell/wlr_xdg_popup.c:326: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(&xdg_surface->popup->positioner, &positioner->attrs, data/wlroots-0.11.0/types/xdg_shell_v6/wlr_xdg_popup_v6.c:357: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(&xdg_surface->popup->positioner, &positioner->attrs, data/wlroots-0.11.0/util/log.c:73: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. static char wlr_fmt[1024]; data/wlroots-0.11.0/xcursor/wlr_xcursor.c:88: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(image->buffer, cursor_data + metadata->offset, size); data/wlroots-0.11.0/xcursor/wlr_xcursor.c:171: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(image->buffer, images->images[i]->pixels, size); data/wlroots-0.11.0/xcursor/xcursor.c:282: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 bytes[4]; data/wlroots-0.11.0/xcursor/xcursor.c:752: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 line[8192]; data/wlroots-0.11.0/xcursor/xcursor.c:759:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen (full, "r"); data/wlroots-0.11.0/xcursor/xcursor.c:823:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen (full, "r"); data/wlroots-0.11.0/xcursor/xcursor.c:901:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(full, "r"); data/wlroots-0.11.0/xwayland/selection/incoming.c:306: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(mime_type, name, len); data/wlroots-0.11.0/xwayland/server.c:88: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 wayland_socket_str[16]; data/wlroots-0.11.0/xwayland/server.c:98: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). int devnull = open("/dev/null", O_WRONLY | O_CREAT | O_CLOEXEC, 0666); data/wlroots-0.11.0/xwayland/sockets.c:116: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 sun_path[64]; data/wlroots-0.11.0/xwayland/sockets.c:132: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 lock_name[64]; data/wlroots-0.11.0/xwayland/sockets.c:136:18: [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). if ((lock_fd = open(lock_name, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, 0444)) >= 0) { data/wlroots-0.11.0/xwayland/sockets.c:142:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 pid[12]; data/wlroots-0.11.0/xwayland/sockets.c:153:18: [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). if ((lock_fd = open(lock_name, O_RDONLY | O_CLOEXEC)) < 0) { data/wlroots-0.11.0/xwayland/sockets.c:157:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 pid[12] = { 0 }, *end_pid; data/wlroots-0.11.0/xwayland/xwm.c:19:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *atom_map[ATOM_LAST] = { data/wlroots-0.11.0/xwayland/xwm.c:498: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(xsurface->window_type, atoms, atoms_size); data/wlroots-0.11.0/xwayland/xwm.c:521: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(xsurface->protocols, atoms, atoms_size); data/wlroots-0.11.0/xwayland/xwm.c:545: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(xsurface->hints, &hints, sizeof(struct wlr_xwayland_surface_hints)); data/wlroots-0.11.0/xwayland/xwm.c:582: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(xsurface->size_hints, &size_hints, data/wlroots-0.11.0/backend/headless/output.c:199:2: [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(wlr_output->make, "headless", sizeof(wlr_output->make)); data/wlroots-0.11.0/backend/headless/output.c:200:2: [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(wlr_output->model, "headless", sizeof(wlr_output->model)); data/wlroots-0.11.0/backend/noop/output.c:78:2: [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(wlr_output->make, "noop", sizeof(wlr_output->make)); data/wlroots-0.11.0/backend/noop/output.c:79:2: [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(wlr_output->model, "noop", sizeof(wlr_output->model)); data/wlroots-0.11.0/backend/wayland/output.c:505:2: [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(wlr_output->make, "wayland", sizeof(wlr_output->make)); data/wlroots-0.11.0/backend/wayland/output.c:506:2: [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(wlr_output->model, "wayland", sizeof(wlr_output->model)); data/wlroots-0.11.0/backend/x11/backend.c:211:10: [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). true, strlen(atom[i].name), atom[i].name); data/wlroots-0.11.0/backend/x11/output.c:311:3: [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(title), title); data/wlroots-0.11.0/examples/input-method.c:191: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). zwp_input_method_v2_set_preedit_string(input_method, "Præedit2", strlen("Pr"), strlen("Præed")); data/wlroots-0.11.0/examples/input-method.c:191:82: [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). zwp_input_method_v2_set_preedit_string(input_method, "Præedit2", strlen("Pr"), strlen("Præed")); data/wlroots-0.11.0/examples/input-method.c:210:61: [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). zwp_input_method_v2_delete_surrounding_text(input_method, strlen("_CommitNoPreed_"), 0); data/wlroots-0.11.0/examples/input-method.c:218:72: [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). zwp_input_method_v2_set_preedit_string(input_method, "PreedWithDel", strlen("Preed"), strlen("Preed")); data/wlroots-0.11.0/examples/input-method.c:218:89: [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). zwp_input_method_v2_set_preedit_string(input_method, "PreedWithDel", strlen("Preed"), strlen("Preed")); data/wlroots-0.11.0/examples/input-method.c:219:61: [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). zwp_input_method_v2_delete_surrounding_text(input_method, strlen("_WaitNo_"), 0); data/wlroots-0.11.0/examples/input-method.c:227:61: [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). zwp_input_method_v2_delete_surrounding_text(input_method, strlen("mit_"), 0); data/wlroots-0.11.0/examples/input-method.c:394:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t n = read(timer_fd, &expirations, sizeof(expirations)); data/wlroots-0.11.0/examples/screencopy-dmabuf.c:90:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(node, dev->nodes[DRM_NODE_RENDER], maxlen - 1); data/wlroots-0.11.0/examples/text-input.c:140:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned)current.preedit.cursor_begin > strlen(preedit_text)) { data/wlroots-0.11.0/examples/text-input.c:173:61: [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). zwp_text_input_v3_set_surrounding_text(text_input, buffer, strlen(buffer), strlen(buffer)); data/wlroots-0.11.0/examples/text-input.c:173:77: [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). zwp_text_input_v3_set_surrounding_text(text_input, buffer, strlen(buffer), strlen(buffer)); data/wlroots-0.11.0/examples/text-input.c:242: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). if (delete_before > strlen(buffer)) { data/wlroots-0.11.0/examples/text-input.c:243: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). delete_before = strlen(buffer); data/wlroots-0.11.0/examples/text-input.c:245:10: [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). buffer[strlen(buffer) - delete_before] = '\0'; data/wlroots-0.11.0/examples/text-input.c:253: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). buffer = calloc(strlen(buffer) + strlen(commit_string) + 1, sizeof(char)); // realloc may fail anyway data/wlroots-0.11.0/examples/text-input.c:253: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). buffer = calloc(strlen(buffer) + strlen(commit_string) + 1, sizeof(char)); // realloc may fail anyway data/wlroots-0.11.0/render/egl.c:98: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 extlen = strlen(ext); data/wlroots-0.11.0/render/egl.c:99: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 char *end = exts + strlen(exts); data/wlroots-0.11.0/render/gles2/renderer.c:638: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 extlen = strlen(ext); data/wlroots-0.11.0/render/gles2/renderer.c:639: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 char *end = exts + strlen(exts); data/wlroots-0.11.0/types/wlr_gamma_control_v1.c:90:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t n_read = read(fd, table, table_size); data/wlroots-0.11.0/types/wlr_keyboard.c:193: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). kb->keymap_size = strlen(kb->keymap_string) + 1; data/wlroots-0.11.0/util/shm.c:25:19: [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). randname(name + strlen(name) - 6); data/wlroots-0.11.0/xcursor/xcursor.c:187:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int (*read) (XcursorFile *file, unsigned char *buf, int len); data/wlroots-0.11.0/xcursor/xcursor.c:268:19: [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). new = malloc (strlen (name) + 1); data/wlroots-0.11.0/xcursor/xcursor.c:287:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((*file->read) (file, bytes, 4) != 4) data/wlroots-0.11.0/xcursor/xcursor.c:641: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). int pathlen = strlen (path); data/wlroots-0.11.0/xcursor/xcursor.c:646:2: [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 (path, "/"); data/wlroots-0.11.0/xcursor/xcursor.c:650:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (elt); data/wlroots-0.11.0/xcursor/xcursor.c:657:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (path + pathlen, elt, len); data/wlroots-0.11.0/xcursor/xcursor.c:678:16: [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). colon = dir + strlen (dir); data/wlroots-0.11.0/xcursor/xcursor.c:684:19: [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). tcolon = theme + strlen (theme); data/wlroots-0.11.0/xcursor/xcursor.c:695:12: [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). homelen = strlen (home); data/wlroots-0.11.0/xcursor/xcursor.c:726: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). full = malloc (strlen (dir) + 1 + strlen (subdir) + 1 + strlen (file) + 1); data/wlroots-0.11.0/xcursor/xcursor.c:726:39: [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). full = malloc (strlen (dir) + 1 + strlen (subdir) + 1 + strlen (file) + 1); data/wlroots-0.11.0/xcursor/xcursor.c:726:61: [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). full = malloc (strlen (dir) + 1 + strlen (subdir) + 1 + strlen (file) + 1); data/wlroots-0.11.0/xcursor/xcursor.c:772: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). result = malloc (strlen (l) + 1); data/wlroots-0.11.0/xwayland/selection/outgoing.c:93:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t len = read(fd, p, available); data/wlroots-0.11.0/xwayland/selection/selection.c:44: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). xcb_intern_atom(xwm->xcb_conn, 0, strlen(mime_type), mime_type); data/wlroots-0.11.0/xwayland/sockets.c:158:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytes = read(lock_fd, pid, sizeof(pid) - 1); data/wlroots-0.11.0/xwayland/xwm.c:1515: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). xcb_intern_atom(xwm->xcb_conn, 0, strlen(atom_map[i]), atom_map[i]); data/wlroots-0.11.0/xwayland/xwm.c:1576:3: [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(name), name); ANALYSIS SUMMARY: Hits = 248 Lines analyzed = 69206 in approximately 1.63 seconds (42468 lines/second) Physical Source Lines of Code (SLOC) = 54464 Hits@level = [0] 214 [1] 51 [2] 110 [3] 62 [4] 25 [5] 0 Hits@level+ = [0+] 462 [1+] 248 [2+] 197 [3+] 87 [4+] 25 [5+] 0 Hits/KSLOC@level+ = [0+] 8.48267 [1+] 4.55347 [2+] 3.61707 [3+] 1.59739 [4+] 0.459019 [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.