Skip to content
Snippets Groups Projects
Commit 20863d35 authored by Simon McVittie's avatar Simon McVittie Committed by Philip Withnall
Browse files

goption: Relax assertion to avoid being broken by kdeinit5

kdeinit5 overwrites argv, which in turn results in /proc/self/cmdline
being overwritten. It seems that this is done in a way that does not
necessarily guarantee that /proc/self/cmdline will end up NUL-terminated.

However, g_file_get_contents() is documented to fill a buffer of size
len + 1, where buffer[len] == '\0', even if the file's actual contents
(from buffer[0] to buffer[len-1] inclusive) did not include a NUL;
so we can safely relax this assertion slightly.

Resolves: https://gitlab.gnome.org/GNOME/glib/issues/1923


Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent b123ee4d
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment