- Mac Install: Fix an off by one error reported during a security audit

mac_install/
        CustomInstall.cpp

svn path=/trunk/boinc/; revision=18479
This commit is contained in:
Rom Walton 2009-06-19 19:25:03 +00:00
parent 66877cf024
commit f59c4f1ff1
2 changed files with 7 additions and 1 deletions

View File

@ -5928,3 +5928,9 @@ Rom 19 June 2009
clientgui/
AccountManagerPropertiesPage.cpp
ProjectPropertiesPage.cpp
Rom 19 June 2009
- Mac Install: Fix an off by one error reported during a security audit
mac_install/
CustomInstall.cpp

View File

@ -89,7 +89,7 @@ int main(int argc, char *argv[])
show_message((StringPtr)"\pPath to application is too long.");
return 0;
}
strncpy(path, argv[0], sizeof(path)); // Path to this application.
strncpy(path, argv[0], sizeof(path)-1); // Path to this application.
p = strstr(path, "/Contents/MacOS/");
*p = '\0';
p = strrchr(path, '/');