mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-13 16:13:47 +02:00
Merge branch 'backport-1206-option-nul-termination' into 'glib-2-62'
Backport !1206 “goption: Relax assertion to avoid being broken by kdeinit5” to glib-2-62 See merge request GNOME/glib!1207
This commit is contained in:
commit
0a019869bb
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user