diff options
author | Simon Howard | 2014-04-01 21:51:18 -0400 |
---|---|---|
committer | Simon Howard | 2014-04-01 21:51:18 -0400 |
commit | 5afef298d6adf6bd6ef852c455647f662a24c995 (patch) | |
tree | 0e5e5f01c4d2a159f091744c3de042af9d79c568 /pkg/osx/Execute.m | |
parent | a9d9335b20a0b708fae1b978f70348aec998356a (diff) | |
download | chocolate-doom-5afef298d6adf6bd6ef852c455647f662a24c995.tar.gz chocolate-doom-5afef298d6adf6bd6ef852c455647f662a24c995.tar.bz2 chocolate-doom-5afef298d6adf6bd6ef852c455647f662a24c995.zip |
osx: Use safe string functions for launcher.
The OS X launcher used a few unsafe string functions; use snprintf()
or strlcpy,strlcat here - as this is the launcher for OS X we don't
need to care about portability.
Diffstat (limited to 'pkg/osx/Execute.m')
-rw-r--r-- | pkg/osx/Execute.m | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m index 0dcfbb7c..0dd6c9a3 100644 --- a/pkg/osx/Execute.m +++ b/pkg/osx/Execute.m @@ -75,8 +75,7 @@ static void DoExec(const char *executable, const char *iwad, const char *args) { char *argv[3]; - argv[0] = malloc(strlen(executable_path) + strlen(executable) + 3); - sprintf(argv[0], "%s/%s", executable_path, executable); + asprintf(&argv[0], "%s/%s", executable_path, executable); if (iwad != NULL || args != NULL) { |