1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-06-13 18:21:03 +02:00

Revert last. It is still wrong.

This commit is contained in:
David Shaw 2006-05-27 02:07:05 +00:00
parent b9c2f44336
commit 49c31957f0
2 changed files with 7 additions and 17 deletions

View File

@ -1,8 +1,3 @@
2006-05-25 Israel G. Lugo <ilugo@bridonsecurity.com> (dshaw)
* exec.c (make_tempdir) [_WIN32]: Modified to properly handle
arbitrarily long temporary directory paths.
2006-05-25 David Shaw <dshaw@jabberwocky.com> 2006-05-25 David Shaw <dshaw@jabberwocky.com>
* keygen.c (gen_dsa): Allow generating DSA2 keys * keygen.c (gen_dsa): Allow generating DSA2 keys

View File

@ -129,21 +129,16 @@ static int make_tempdir(struct exec_info *info)
if(tmp==NULL) if(tmp==NULL)
{ {
#if defined (_WIN32) #if defined (_WIN32)
int tmp_siz; int err;
int len=0;
/* Poll temp path length */ tmp=xmalloc(MAX_PATH);
tmp_siz=GetTempPath(0,NULL); err=GetTempPath(MAX_PATH,tmp);
if(tmp_siz) if(err==0 || err>MAX_PATH)
{ strcpy(tmp,"c:\\windows\\temp");
tmp=xmalloc(tmp_siz);
len=GetTempPath(tmp_siz,tmp);
}
if(len==0)
tmp=xstrdup("c:\\windows\\temp");
else else
{ {
int len=strlen(tmp);
/* GetTempPath may return with \ on the end */ /* GetTempPath may return with \ on the end */
while(len>0 && tmp[len-1]=='\\') while(len>0 && tmp[len-1]=='\\')
{ {