From f59c4f1ff1c10f610e6bf1a16400fd85c7cfc1f1 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 19 Jun 2009 19:25:03 +0000 Subject: [PATCH] - Mac Install: Fix an off by one error reported during a security audit mac_install/ CustomInstall.cpp svn path=/trunk/boinc/; revision=18479 --- checkin_notes | 6 ++++++ mac_installer/CustomInstall.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 9ae42ff771..46f5f87685 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/mac_installer/CustomInstall.cpp b/mac_installer/CustomInstall.cpp index c0d3c0a64f..c332545df2 100644 --- a/mac_installer/CustomInstall.cpp +++ b/mac_installer/CustomInstall.cpp @@ -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, '/');