From b4266a20f869d0b57d9309e95b5c5c62f1a9912b Mon Sep 17 00:00:00 2001 From: rim Date: Sun, 9 Dec 2018 13:00:41 +0300 Subject: [PATCH] Make valngrind happy: correct calculate mem size to move --- 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 8188de6..025125d 100644 --- a/src/task-manager.c +++ b/src/task-manager.c @@ -172,7 +172,7 @@ pretty_cmdline (gchar *cmdline, gchar *comm) gchar *p = g_strstr_len (text, (gssize)text_size, comm); if (p != NULL) { - memmove (text, p, text_size); + memmove (text, p, (text_size - (p - text))); } } }