[svn] GnuPG - r4147 - trunk/g10
svn author dshaw
cvs at cvs.gnupg.org
Thu May 25 05:02:54 CEST 2006
Author: dshaw
Date: 2006-05-25 05:02:51 +0200 (Thu, 25 May 2006)
New Revision: 4147
Modified:
trunk/g10/ChangeLog
trunk/g10/exec.c
Log:
* exec.c (make_tempdir): Fix bug with a temporary directory on Win32
that is over 256 bytes long. Noted by Israel G. Lugo.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2006-05-24 11:12:28 UTC (rev 4146)
+++ trunk/g10/ChangeLog 2006-05-25 03:02:51 UTC (rev 4147)
@@ -1,3 +1,8 @@
+2006-05-24 David Shaw <dshaw at jabberwocky.com>
+
+ * 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 <dshaw at jabberwocky.com>
* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we
Modified: trunk/g10/exec.c
===================================================================
--- trunk/g10/exec.c 2006-05-24 11:12:28 UTC (rev 4146)
+++ trunk/g10/exec.c 2006-05-25 03:02:51 UTC (rev 4147)
@@ -129,8 +129,11 @@
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
{
More information about the Gnupg-commits
mailing list