Go to file
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
clutter clutter: Fix build 2016-11-07 14:24:36 +01:00
cogl cogl/egl: Fix non-Wayland build 2016-09-02 17:04:11 +08:00
data build: Say good-bye to intltool 2016-08-19 11:04:48 +02:00
doc Remove gtk-doc 2015-07-06 00:52:18 -07:00
po Update zh_CN translation 2016-10-30 02:20:44 +08:00
src xwayland: Fix lockfile size confusion 2016-11-17 14:31:24 +01:00
tools Clean up the source tree 2014-03-18 20:37:35 -04:00
.gitignore wayland: Add support for the xdg-foreign protocol 2016-08-22 21:03:41 +08:00
autogen.sh build: Drop deprecated autogen.sh variables 2015-03-04 21:00:48 +01:00
configure.ac Bump version to 3.23.1 2016-10-30 22:24:13 +01:00
COPYING Updated obsolete FSF postal address in COPYING 2014-01-13 11:35:48 -05:00
Makefile.am Fix the merged build 2016-04-27 20:37:47 +02:00
mutter.doap doap: add <programming-language> 2014-07-31 17:50:28 +02:00
NEWS Bump version to 3.23.1 2016-10-30 22:24:13 +01:00