git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f085301
)
common: Null terminate process name string so valgrind doesn't complain
author
Amitay Isaacs
<amitay@gmail.com>
Fri, 2 Aug 2013 01:05:08 +0000
(11:05 +1000)
committer
Amitay Isaacs
<amitay@gmail.com>
Wed, 14 Aug 2013 06:55:51 +0000
(16:55 +1000)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
common/system_linux.c
patch
|
blob
|
history
diff --git
a/common/system_linux.c
b/common/system_linux.c
index ab232f0aaff1f69db94ff70366e7c614a966eb06..84daba4fdfae21916b121eaa43201bebc5f004dc 100644
(file)
--- a/
common/system_linux.c
+++ b/
common/system_linux.c
@@
-606,6
+606,7
@@
int ctdb_set_process_name(const char *name)
char procname[16];
strncpy(procname, name, 15);
+ procname[15] = '\0';
return prctl(PR_SET_NAME, (unsigned long)procname, 0, 0, 0);
}