Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 202977
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 199749
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jan Psota <jasiu@belsznica.pl>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 202977 depends on: Show dependency tree
Bug 202977 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-12-22 02:20 0000
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);

------- Comment #1 From Roy Marples (RETIRED) 2007-12-22 11:10:32 0000 -------

*** This bug has been marked as a duplicate of bug 199749 ***

------- Comment #2 From Roy Marples (RETIRED) 2007-12-22 11:11:06 0000 -------
Thanks for the patch though :)

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug