aboutsummaryrefslogtreecommitdiffstats
path: root/g10/exec.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2006-06-27 14:30:59 +0000
committerWerner Koch <[email protected]>2006-06-27 14:30:59 +0000
commitf081ad529d212be23aa5dd9d4bfb81282748e5eb (patch)
treeaa3f3744a05c5e93ea24feb41342b2507d9b0b31 /g10/exec.c
parentPreparing a new release (diff)
downloadgnupg-f081ad529d212be23aa5dd9d4bfb81282748e5eb.tar.gz
gnupg-f081ad529d212be23aa5dd9d4bfb81282748e5eb.zip
Ported patches from 1.4.x
Diffstat (limited to 'g10/exec.c')
-rw-r--r--g10/exec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/g10/exec.c b/g10/exec.c
index 6938a409a..203c4c78f 100644
--- a/g10/exec.c
+++ b/g10/exec.c
@@ -127,8 +127,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+2);
+ err=GetTempPath(MAX_PATH+1,tmp);
+ if(err==0 || err>MAX_PATH+1)
strcpy(tmp,"c:\\windows\\temp");
else
{