Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
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);
*** This bug has been marked as a duplicate of bug 199749 ***
Thanks for the patch though :)