mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* exec.c (make_tempdir): Fix bug with a temporary directory on Win32
that is over 256 bytes long. Noted by Israel G. Lugo.
This commit is contained in:
parent
071d362ba6
commit
5cef0cac5a
@ -1,3 +1,8 @@
|
|||||||
|
2006-05-24 David Shaw <dshaw@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@jabberwocky.com>
|
2006-05-23 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we
|
* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we
|
||||||
|
@ -129,8 +129,11 @@ static int make_tempdir(struct exec_info *info)
|
|||||||
if(tmp==NULL)
|
if(tmp==NULL)
|
||||||
{
|
{
|
||||||
#if defined (_WIN32)
|
#if defined (_WIN32)
|
||||||
tmp=xmalloc(256);
|
int err;
|
||||||
if(GetTempPath(256,tmp)==0)
|
|
||||||
|
tmp=xmalloc(MAX_PATH+1);
|
||||||
|
err=GetTempPath(MAX_PATH+1,tmp);
|
||||||
|
if(err==0 || err>MAX_PATH+1)
|
||||||
strcpy(tmp,"c:\\windows\\temp");
|
strcpy(tmp,"c:\\windows\\temp");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user