Use g_strlcpy() instead of g_snprintf(dest, strlen(dest), "%s", src)
Fixes a SIGABRT at startup on OpenBSD, for some reason deep in the glib/libc stack the va_list arg p is lost.. g_strlcpy() is equivalent here, and even faster.
This commit is contained in:
@@ -146,7 +146,7 @@ pretty_cmdline (gchar *cmdline, gchar *comm)
|
||||
gchar *p = g_strstr_len (text, -1, comm);
|
||||
if (p != NULL)
|
||||
{
|
||||
g_snprintf (text, g_utf8_strlen (text, -1), "%s", p);
|
||||
g_strlcpy (text, p, g_utf8_strlen (text, -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user