Fixed memory initialization error in pidof. Fix provided by Markus Fischer.
This commit is contained in:
parent
b70b2776ed
commit
b6aacf3b68
@ -7,6 +7,7 @@ sysvinit (3.07) released; urgency=low
|
||||
This is now fixed as we check both the realpath and symbolic path for processes.
|
||||
In other words, "pidof /tmp/sleep" and "pidof /usr/bin/sleep" will return
|
||||
the same PIDs when /tmp/sleep is a symbolic link to /usr/bin/sleep.
|
||||
* Fixed memory initialization error in pidof. Fix provided by Markus Fischer.
|
||||
|
||||
|
||||
sysvinit (3.06) released; urgency=low
|
||||
|
@ -662,6 +662,7 @@ int readproc()
|
||||
/* Try to stat the executable. */
|
||||
snprintf(path, sizeof(path), "/proc/%s/exe", d->d_name);
|
||||
p->pathname = (char *)xmalloc(PATH_MAX);
|
||||
memset(p->pathname, 0, PATH_MAX);
|
||||
if (readlink(path, p->pathname, PATH_MAX) == -1) {
|
||||
p->pathname = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user