summaryrefslogtreecommitdiffstats
path: root/PCbuild/make_buildinfo.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-01-18 20:04:02 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-01-18 20:04:02 (GMT)
commit8207cc7fd69b2a74bab60d7a3735cd83394f3dbb (patch)
tree0354e4646a8adf2abc2a87ed7d0bf571a1d28c68 /PCbuild/make_buildinfo.c
parent3150a270d263509d5477df34ebe6bad9ed629b19 (diff)
downloadcpython-8207cc7fd69b2a74bab60d7a3735cd83394f3dbb.zip
cpython-8207cc7fd69b2a74bab60d7a3735cd83394f3dbb.tar.gz
cpython-8207cc7fd69b2a74bab60d7a3735cd83394f3dbb.tar.bz2
Quote the path to the executable before invoking system().
Diffstat (limited to 'PCbuild/make_buildinfo.c')
-rw-r--r--PCbuild/make_buildinfo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/PCbuild/make_buildinfo.c b/PCbuild/make_buildinfo.c
index ca2db9f..798967a 100644
--- a/PCbuild/make_buildinfo.c
+++ b/PCbuild/make_buildinfo.c
@@ -31,12 +31,13 @@ int make_buildinfo2()
RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)
/* Tortoise not installed */
return 0;
- size = sizeof(command);
- if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command, &size) != ERROR_SUCCESS ||
+ command[0] = '"'; /* quote the path to the executable */
+ size = sizeof(command) - 1;
+ if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||
type != REG_SZ)
/* Registry corrupted */
return 0;
- strcat(command, "bin\\subwcrev.exe");
+ strcat(command, "bin\\subwcrev.exe\"");
if (_stat(command, &st) < 0)
/* subwcrev.exe not part of the release */
return 0;