weston/xwayland
Pekka Paalanen 61beda653b xwayland: fix lock file parsing
Patch 139fcabe7c "xwayland: Improve error
checking for strtol call" caused a regression in the X11 unix socket
lock file parsing. Before that patch, only the first 10 characters were
considered for parsing. After the patch, the newline as the 11th
character caused strtol() to stop parsing at the 10th character which
was then considered an error as not the whole input was consumed.

The effect of the regression was that no X11 lock files were ever deemed
stale, hence stale lock files were never removed. Up till now, I have
accumulated 37 lock files, and Weston complaining for each of them on
every start it cannot parse them.

Fix this by terminating the string at the expected newline character.

Also, it looks like 'pid' was being used uninitialized, risking strtol()
reading past the end of the array. This patch fixes that too.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-16 16:24:15 +00:00
..
dnd.c xwayland: Move includes to avoid deprecation warnings 2016-11-01 17:02:38 +00:00
hash.c Make config.h inclusion consistent 2016-06-16 11:01:54 -07:00
hash.h include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
launcher.c xwayland: fix lock file parsing 2016-11-16 16:24:15 +00:00
selection.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
window-manager.c xwayland: Move includes to avoid deprecation warnings 2016-11-01 17:02:38 +00:00
xwayland-api.h xwayland: Introduce a private struct for XWayland interface 2016-08-14 09:29:08 +02:00
xwayland-internal-interface.h xwayland: Introduce a private struct for XWayland interface 2016-08-14 09:29:08 +02:00
xwayland.h xwayland: make the plugin usable by libweston compositors 2016-07-01 14:34:33 +03:00