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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1322a63 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
  • src/init.c

    Submitted By: Alexander E. Patrakov (semzx at newmail dot ru)
    Origin: Alexander E. Patrakov
    Date: 2003-11-22
    Initial Package Version: 2.85
    Description: Without this patch, init sometimes clobbers environment variables
    set by kernel (such as TERM) when trying to change process title for ps
    due to out-of-bounds access to the command line arguments.
    
    diff -ur sysvinit-2.85/src/init.c sysvinit-2.85-fixed/src/init.c
    old new  
    432432        len = vsnprintf(buf, sizeof(buf), fmt, ap);
    433433        va_end(ap);
    434434
    435         memset(argv0, 0, maxproclen + 1);
     435        memset(argv0, 0, maxproclen);
    436436        strncpy(argv0, buf, maxproclen - 1);
    437437
    438438        return len;
Note: See TracBrowser for help on using the repository browser.