Bug in keyserver code: DOS line endings
David Shaw
dshaw at jabberwocky.com
Wed Jun 12 02:49:01 CEST 2002
On Tue, Jun 11, 2002 at 06:29:59PM -0500, Keith Ray wrote:
> I compiled the gpgkeys_ldap for win32
Hey, excellent! I was hoping someone would do this and report back
how it worked out. What did you have to do to link in the libraries?
> but I found a bug in the GnuPG
> keyserver code. In keyserver.c line 493:
>
> while(line[0]!='\n');
>
> This does not work on a win32 build because gpgkeys ends its lines
> with "\r\n". Changing this line to something like this might work:
>
> while(line[0]!='\n' || line[1]!='\n');
>
> or something like
>
> #if defined (__MINGW32__) || defined (__CYGWIN32__)
> while(line[0]!='\r' && line[1]!='\n');
> #else
> while(line[0]!='\n');
> #endif
Is this sort of line ending magic portable to Cygwin as well as
Mingw32? (You're using Mingw32, right?)
Aside from this problem, does it work all right on Win32?
David
--
David Shaw | dshaw at jabberwocky.com | WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anderson
More information about the Gnupg-devel
mailing list