~vcs-imports/procps/main

« back to all changes in this revision

Viewing changes to sysctl.c

  • Committer: albert
  • Date: 2007-05-28 01:59:28 UTC
  • Revision ID: vcs-imports@canonical.com-20070528015928-t54o2yhb4kzejxln
sysctl: fix crash -- thanks Steinar Gunderson      #423704

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
   }
136
136
 
137
137
   /* used to open the file */
138
 
   tmpname = malloc(strlen(name)+strlen(PROC_PATH)+1);
 
138
   tmpname = malloc(strlen(name)+strlen(PROC_PATH)+2);
139
139
   strcpy(tmpname, PROC_PATH);
140
140
   strcat(tmpname, name); 
141
141
   slashdot(tmpname+strlen(PROC_PATH),'.','/'); /* change . to / */