| Summary: | start-stop-daemon PATH striping patch (<=baselayout-2.0.0_rc6) | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Jan Psota <jasiupsota> |
| Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | critical | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
*** This bug has been marked as a duplicate of bug 199749 *** Thanks for the patch though :) |
start-stop-daemon /rc/ from PATH remove function does not copy terminating '\0' from token, full patch attached in 'additional information', and here is the only change (src/start-stop-daemon.c, line 908): -memcpy (np, token, sizeof (char) * strlen (token)); +memcpy (np, token, sizeof (char) * strlen (token) + 1); Reproducible: Always Steps to Reproduce: 1. set loglevel to debug in /etc/conf.d/distccd 2. /etc/init.d/distccd start 3. try to compile using distcc and look into syslog Actual Results: distccd returns with 110 (cannot find compiler), because of PATH setting broken by strange characters after actual paths Expected Results: distcc compiles OK --- src/start-stop-daemon.c~ 2007-12-22 02:44:58.000000000 +0100 +++ src/start-stop-daemon.c 2007-12-22 02:44:58.000000000 +0100 @@ -905,7 +905,7 @@ (l + strlen (token) + 2)); np = newpath + l; *np++ = ':'; - memcpy (np, token, sizeof (char) * strlen (token)); + memcpy (np, token, sizeof (char) * strlen (token) + 1); } else { l = strlen ("PATH=") + strlen (token) + 1; newpath = xmalloc (sizeof (char) * l);