git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae30b61
)
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>
(This used to be ctdb commit
1c9025fdd08d1cea342af7487d0123015e08831b
)
ctdb/common/system_linux.c
patch
|
blob
|
history
diff --git
a/ctdb/common/system_linux.c
b/ctdb/common/system_linux.c
index ab232f0aaff1f69db94ff70366e7c614a966eb06..84daba4fdfae21916b121eaa43201bebc5f004dc 100644
(file)
--- a/
ctdb/common/system_linux.c
+++ b/
ctdb/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);
}