[Xfce4-commits] [apps/xfce4-taskmanager] 02/02: Use g_strlcpy() instead of g_snprintf(dest, strlen(dest), "%s", src)

noreply at xfce.org noreply at xfce.org
Sat Nov 29 12:02:18 CET 2014


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 59ed589b2640a1b2d2fce4bd571eda0b6361f1e2
Author: Landry Breuil <landry at xfce.org>
Date:   Sat Nov 29 11:48:38 2014 +0100

    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.
---
 src/task-manager.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/task-manager.c b/src/task-manager.c
index 01a45aa..d416c78 100644
--- a/src/task-manager.c
+++ b/src/task-manager.c
@@ -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));
 			}
 		}
 	}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list