s/strcpy/strncpy and fix somes unused variables

This commit is contained in:
Philippe Pepiot
2010-11-19 17:36:37 +01:00
parent 82b17ea02f
commit d75746bcf4
11 changed files with 52 additions and 29 deletions

View File

@@ -417,7 +417,7 @@ patht(char *path)
if(!path)
return NULL;
strcpy(ret, path);
strncpy(ret, path, sizeof(ret));
if(strstr(path, "~/"))
sprintf(ret, "%s/%s", getenv("HOME"), path + 2);