source: patches/sysvinit-2.85-proclen-1.patch@ 3937eff

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