aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2006-05-25 03:02:51 +0000
committerDavid Shaw <[email protected]>2006-05-25 03:02:51 +0000
commit5cef0cac5ad0f2ee2301460bbe383557b0a0d52a (patch)
tree0fb789a26def3b7d69cb4a0bc64a2065dc37cf61
parent* mksamplekeys: Incorporate new package signature key and minimize keys (diff)
downloadgnupg-5cef0cac5ad0f2ee2301460bbe383557b0a0d52a.tar.gz
gnupg-5cef0cac5ad0f2ee2301460bbe383557b0a0d52a.zip
* exec.c (make_tempdir): Fix bug with a temporary directory on Win32
that is over 256 bytes long. Noted by Israel G. Lugo.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/exec.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 9c7252267..2b281f1b1 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-24 David Shaw <[email protected]>
+
+ * exec.c (make_tempdir): Fix bug with a temporary directory on
+ Win32 that is over 256 bytes long. Noted by Israel G. Lugo.
+
2006-05-23 David Shaw <[email protected]>
* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we
diff --git a/g10/exec.c b/g10/exec.c
index fbd935c4a..924349d25 100644
--- a/g10/exec.c
+++ b/g10/exec.c
@@ -129,8 +129,11 @@ static int make_tempdir(struct exec_info *info)
if(tmp==NULL)
{
#if defined (_WIN32)
- tmp=xmalloc(256);
- if(GetTempPath(256,tmp)==0)
+ int err;
+
+ tmp=xmalloc(MAX_PATH+1);
+ err=GetTempPath(MAX_PATH+1,tmp);
+ if(err==0 || err>MAX_PATH+1)
strcpy(tmp,"c:\\windows\\temp");
else
{