mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 18:36:17 +01:00
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:
commit
ba29ef441b
@ -1833,8 +1833,10 @@ platform_get_argv0 (void)
|
||||
NULL))
|
||||
return NULL;
|
||||
|
||||
/* Sanity check for a NUL terminator. */
|
||||
g_assert (memchr (cmdline, 0, len));
|
||||
/* g_file_get_contents() guarantees to put a NUL immediately after the
|
||||
* 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
|
||||
* to hold on to a smaller malloc block; the arguments
|
||||
|
Loading…
Reference in New Issue
Block a user