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
  • 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.