diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-08-16 20:28:37 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-08-16 20:28:37 +0200 |
commit | 0afa8dfb078fb61def8fa62ff57229251f2baa6f (patch) | |
tree | 7cfb6e69e20d48a52ad7e70a3c0bcebe75a72eff /service-win32/service.c | |
parent | Fixed compiler warning in ssl.c (diff) | |
parent | Windows security issue: (diff) | |
download | openvpn-0afa8dfb078fb61def8fa62ff57229251f2baa6f.tar.xz |
Merge branch 'svn-BETA21' into beta2.2
Diffstat (limited to 'service-win32/service.c')
-rw-r--r-- | service-win32/service.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/service-win32/service.c b/service-win32/service.c index d5211bd..91b5821 100644 --- a/service-win32/service.c +++ b/service-win32/service.c @@ -370,11 +370,13 @@ int CmdInstallService() int ret = 0; - if ( GetModuleFileName( NULL, szPath, 512 ) == 0 ) + if ( GetModuleFileName( NULL, szPath+1, 510 ) == 0 ) { _tprintf(TEXT("Unable to install %s - %s\n"), TEXT(SZSERVICEDISPLAYNAME), GetLastErrorText(szErr, 256)); return 1; } + szPath[0] = '\"'; + strcat(szPath, "\""); schSCManager = OpenSCManager( NULL, // machine (NULL == local) |