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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8f245dd was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 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.