Merge branch 'wip/smcv/issue1923' into 'master'

goption: Relax assertion to avoid being broken by kdeinit5

Closes #1923

See merge request GNOME/glib!1206
This commit is contained in:
Philip Withnall 2019-10-31 15:17:23 +00:00
commit ba29ef441b

View File

@ -1833,8 +1833,10 @@ platform_get_argv0 (void)
NULL)) NULL))
return NULL; return NULL;
/* Sanity check for a NUL terminator. */ /* g_file_get_contents() guarantees to put a NUL immediately after the
g_assert (memchr (cmdline, 0, len)); * file's contents (at cmdline[len] here), even if the file itself was
* not NUL-terminated. */
g_assert (memchr (cmdline, 0, len + 1));
/* We could just return cmdline, but I think it's better /* We could just return cmdline, but I think it's better
* to hold on to a smaller malloc block; the arguments * to hold on to a smaller malloc block; the arguments