source: patches/sysvinit-2.85-proclen-1.patch @ 617118d

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

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

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