source: scripts/patches/sysvinit-2.85-proclen-1.patch @ d7f7ff5

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since d7f7ff5 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 18 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 756 bytes
RevLine 
[617118d]1Submitted By: Alexander E. Patrakov (semzx at newmail dot ru)
2Origin: Alexander E. Patrakov
3Date: 2003-11-22
4Initial Package Version: 2.85
5Description: Without this patch, init sometimes clobbers environment variables
6set by kernel (such as TERM) when trying to change process title for ps
7due to out-of-bounds access to the command line arguments.
8
9diff -ur sysvinit-2.85/src/init.c sysvinit-2.85-fixed/src/init.c
10--- sysvinit-2.85/src/init.c    2003-04-15 17:16:41.000000000 +0600
11+++ sysvinit-2.85-fixed/src/init.c      2003-11-22 19:46:03.000000000 +0500
12@@ -432,7 +432,7 @@
13        len = vsnprintf(buf, sizeof(buf), fmt, ap);
14        va_end(ap);
15 
16-       memset(argv0, 0, maxproclen + 1);
17+       memset(argv0, 0, maxproclen);
18        strncpy(argv0, buf, maxproclen - 1);
19 
20        return len;
Note: See TracBrowser for help on using the repository browser.