psmisc/pstree-segfault.patch
2012-02-27 17:46:23 +00:00

12 lines
355 B
Diff

--- src/pstree.c
+++ src/pstree.c 2012-02-27 17:15:05.418433600 +0000
@@ -376,7 +376,7 @@ add_proc(const char *comm, pid_t pid, pi
#endif /*WITH_SELINUX */
else {
strncpy(this->comm, comm, COMM_LEN+2);
- this->comm[COMM_LEN+1];
+ this->comm[COMM_LEN+1]='\0';
this->uid = uid;
}
if (args)