1
0
Fork 0
mutter-performance-source/src/wayland
Daniel Stone f99a086444 xwayland: Fix lockfile size confusion
Similarly to Weston (where this code originated), there were two errors
in the X11 lockfile handling.

Firstly, after reading 11 characters from the lock file (which could
have been placed by any process), there was no guarantee of
NUL-termination, meaning strtol could've theoretically run off the end
of the string.

Secondly, whilst writing the new lock, the trailing NUL byte was not
correctly accounted for. The size passed as an input to snprintf takes
the maximum size of the string including the trailing NUL, whilst the
return (and the input to write) gives the actual size of the string
without the trailing NUL.

The code did attempt to check the return value, however snprintf returns
the size of the _potential_ string written, before snprintf culls it, so
this was off by one, and the LF was not being written.

Signed-off-by: Daniel Stone <daniels@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=774613
2016-11-17 14:31:24 +01:00
..
protocol wayland: Make gtk_shell handle our private window states 2016-08-25 12:19:40 +08:00
meta-pointer-confinement-wayland.c wayland: Make seat devices GObjects 2016-09-09 10:09:46 +08:00
meta-pointer-confinement-wayland.h Implement support for the wp_pointer_constraints protocol 2016-02-16 19:02:48 +08:00
meta-pointer-lock-wayland.c Implement support for the wp_pointer_constraints protocol 2016-02-16 19:02:48 +08:00
meta-pointer-lock-wayland.h Implement support for the wp_pointer_constraints protocol 2016-02-16 19:02:48 +08:00
meta-wayland-buffer.c wayland: Survive an unsupported buffer size 2016-08-26 11:16:07 +02:00
meta-wayland-buffer.h wayland: Move buffer use count to MetaWaylandSurface 2016-03-29 18:26:10 +08:00
meta-wayland-data-device-private.h wayland: Implement the (so far internal) primary selection protocol 2016-02-26 19:51:32 +01:00
meta-wayland-data-device.c MetaWaylandDataSourcePrimary: use the correct parent GType 2016-10-17 13:47:20 +02:00
meta-wayland-data-device.h wayland: Implement the (so far internal) primary selection protocol 2016-02-26 19:51:32 +01:00
meta-wayland-gtk-shell.c wayland: Make gtk_shell handle our private window states 2016-08-25 12:19:40 +08:00
meta-wayland-gtk-shell.h wayland: Move out gtk_shell from meta-wayland-surface.c 2016-08-25 12:19:40 +08:00
meta-wayland-input-device.c wayland/input-device: Add next serial helper 2016-10-11 22:51:50 +08:00
meta-wayland-input-device.h wayland/input-device: Add next serial helper 2016-10-11 22:51:50 +08:00
meta-wayland-keyboard.c wayland/keyboard: Check keyboard presence at set focus call site 2016-10-11 22:51:54 +08:00
meta-wayland-keyboard.h wayland: Move device seat association to MetaWaylandInputDevice 2016-09-15 09:55:34 +08:00
meta-wayland-outputs.c MetaWaylandOutput: Pretend outputs are always untransformed 2016-09-15 10:14:20 +08:00
meta-wayland-outputs.h MetaWaylandOutput: Cleanup type declaration 2016-09-15 10:14:20 +08:00
meta-wayland-pointer-constraints.c wayland/pointer-constraints: Don't include window frame in region 2016-10-13 12:59:41 +08:00
meta-wayland-pointer-constraints.h MetaWaylandPointerConstraint: Use own 'appears-focused' signal handler 2016-03-09 14:26:53 +08:00
meta-wayland-pointer-gesture-pinch.c wayland: Forward touchpad pinch n_fingers information to clients 2016-11-04 16:28:30 +01:00
meta-wayland-pointer-gesture-pinch.h wayland: Implement the wl_pointer_gesture_pinch interface 2015-08-10 17:23:23 +02:00
meta-wayland-pointer-gesture-swipe.c clutter: Rename touchpad gesture n_fingers getter to be more generic 2016-11-04 16:28:30 +01:00
meta-wayland-pointer-gesture-swipe.h wayland: Implement the wl_pointer_gesture_swipe interface 2015-08-10 17:23:23 +02:00
meta-wayland-pointer-gestures.c configure.ac: Add AC_GNU_SOURCE 2016-07-20 14:23:48 +08:00
meta-wayland-pointer-gestures.h wayland: Implement wl_pointer_gestures 2015-08-10 17:30:12 +02:00
meta-wayland-pointer.c wayland: Don't cancel the pointer grab on compositor grabs 2016-10-19 15:45:33 +08:00
meta-wayland-pointer.h wayland/pointer: Add way to cancel current grab 2016-10-12 10:08:59 +08:00
meta-wayland-popup.c MetaWaylandPopup: Dismiss popup when grab is cancelled 2016-10-12 10:08:59 +08:00
meta-wayland-popup.h wayland: Add 'MetaWaylandPopupSurface' bridge between popup and surface 2016-05-01 21:11:27 +08:00
meta-wayland-private.h wayland: Add MetaWaylandTabletManager 2016-05-03 18:17:01 +02:00
meta-wayland-region.c wayland: Make the MetaWaylandRegion type opaque 2014-10-07 20:44:19 -07:00
meta-wayland-region.h wayland: Make the MetaWaylandRegion type opaque 2014-10-07 20:44:19 -07:00
meta-wayland-seat.c wayland/seat: Use seat capability checking helper 2016-10-11 22:51:54 +08:00
meta-wayland-seat.h wayland: Add common object for device classes 2016-09-15 09:54:55 +08:00
meta-wayland-surface-role-cursor.c wayland/cursor-role: Handle premature wl_buffer destruction 2016-09-09 10:02:41 +08:00
meta-wayland-surface-role-cursor.h wayland: Make MetaWaylandSurfaceRoleCursor derivable 2016-07-22 13:31:09 +02:00
meta-wayland-surface-role-tablet-cursor.c wayland: Add MetaWaylandSurfaceRoleTabletCursor 2016-07-22 13:31:09 +02:00
meta-wayland-surface-role-tablet-cursor.h wayland: Add MetaWaylandSurfaceRoleTabletCursor 2016-07-22 13:31:09 +02:00
meta-wayland-surface.c MetaWaylandSurface: Move destroy signal even earlier 2016-09-09 10:09:46 +08:00
meta-wayland-surface.h MetaWaylandSurface: Move destroy signal even earlier 2016-09-09 10:09:46 +08:00
meta-wayland-tablet-manager.c wayland: Add pointer from MetaWaylandTabletSeat to MetaWaylandSeat 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-manager.h wayland: Add methods to update the position of different tools' cursors 2016-05-03 18:17:01 +02:00
meta-wayland-tablet-pad-group.c wayland: Emit wp_tablet_pad_group.buttons after focus changes 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-pad-group.h wayland: Export function to tell whether a button belongs to a pad group 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-pad-ring.c wayland: Check serial on wp_tablet_pad_ring.set_feedback 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-pad-ring.h wayland: Add method to relate a pad ring to its group 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-pad-strip.c wayland: Check serial on wp_tablet_pad_strip.set_feedback 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-pad-strip.h wayland: Add method to relate a pad strip to its group 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-pad.c core: Handle special actions associated to pad buttons in generic code 2016-11-04 21:25:31 +01:00
meta-wayland-tablet-pad.h wayland: Move strips/rings management back to MetaWaylandTabletPad 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-seat.c wayland: Make seat devices GObjects 2016-09-09 10:09:46 +08:00
meta-wayland-tablet-seat.h wayland: Add focus management to pads 2016-07-22 13:31:09 +02:00
meta-wayland-tablet-tool.c clutter/evdev: Take over stylus configuration 2016-11-04 21:25:31 +01:00
meta-wayland-tablet-tool.h wayland: Add methods to update the position of different tools' cursors 2016-05-03 18:17:01 +02:00
meta-wayland-tablet.c wayland: Implement wp_tablet.path 2016-07-22 13:31:09 +02:00
meta-wayland-tablet.h wayland: Remove unused list from MetaWaylandTablet 2016-05-10 17:45:04 +02:00
meta-wayland-touch.c wayland: Cancel touches on meta_wayland_touch_disable() 2016-10-14 18:22:42 +02:00
meta-wayland-touch.h wayland: Move device seat association to MetaWaylandInputDevice 2016-09-15 09:55:34 +08:00
meta-wayland-types.h wayland: Add common object for device classes 2016-09-15 09:54:55 +08:00
meta-wayland-versions.h wayland: Add support for the xdg-foreign protocol 2016-08-22 21:03:41 +08:00
meta-wayland-wl-shell.c wayland: Make seat devices GObjects 2016-09-09 10:09:46 +08:00
meta-wayland-wl-shell.h wayland: Make wl_shell surface role name shorter 2016-05-01 21:11:27 +08:00
meta-wayland-xdg-foreign.c wayland: Add support for the xdg-foreign protocol 2016-08-22 21:03:41 +08:00
meta-wayland-xdg-foreign.h wayland: Add support for the xdg-foreign protocol 2016-08-22 21:03:41 +08:00
meta-wayland-xdg-shell.c wayland/xdg-shell: Scale positioner coordinates 2016-10-13 13:57:54 +08:00
meta-wayland-xdg-shell.h wayland/xdg-shell: Port to unstable v6 2016-08-25 12:19:40 +08:00
meta-wayland.c wayland: Make seat devices GObjects 2016-09-09 10:09:46 +08:00
meta-wayland.h Nested X11: use KeymapNotify events to fix key state on FocusIn 2015-09-03 16:02:25 -04:00
meta-window-wayland.c wayland: do not explicitly focus xdg_popup 2016-10-27 17:21:21 +02:00
meta-window-wayland.h wayland: add min/max size from xdg-shell v6 2016-09-06 08:54:08 +02:00
meta-xwayland-private.h xwayland: Implement wayland-to-X11 DnD 2015-05-29 11:27:53 +02:00
meta-xwayland-selection-private.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-xwayland-selection.c xwayland: Ignore selection request not meant to our internal window 2016-10-07 16:05:22 +02:00
meta-xwayland.c xwayland: Fix lockfile size confusion 2016-11-17 14:31:24 +01:00
meta-xwayland.h wayland: Don't scale XWayland pointer cursor sprites 2015-10-04 14:17:14 +08:00