sysctl: fix crash -- thanks Steinar Gunderson #423704

This commit is contained in:
albert
2007-05-28 01:59:28 +00:00
parent 805d426d07
commit 7ed102fd76
3 changed files with 11 additions and 3 deletions

View File

@ -135,7 +135,7 @@ static int ReadSetting(const char *restrict const name) {
}
/* used to open the file */
tmpname = malloc(strlen(name)+strlen(PROC_PATH)+1);
tmpname = malloc(strlen(name)+strlen(PROC_PATH)+2);
strcpy(tmpname, PROC_PATH);
strcat(tmpname, name);
slashdot(tmpname+strlen(PROC_PATH),'.','/'); /* change . to / */