[PATCHES] patch contrib/pgcrypto for win32

2004-12-05 Thread Korea PostgreSQL Users' Group
ï I found that function gen_salt() in contrib/pgcrypto had bug on win32.   I patched contrib/pgcrypto/random.c file.   --   $ diff random.orig.c random.c 42a43> #include 87a89,90>   srandom(time(NULL));> 89c92<   *dst++ = random();---> 

Re: [PATCHES] patch contrib/pgcrypto for win32

2004-12-05 Thread Andrew Dunstan
Korea PostgreSQL Users Group said: > I found that function gen_salt() in contrib/pgcrypto had bug on win32. > > I patched contrib/pgcrypto/random.c file. > > -- > > $ diff random.orig.c random.c > 42a43 >> #include > 87a89,90 >> srandom(time(NULL)); >> > 89c92 > < *

[PATCHES] patch contrib/pgcrypto for win32 (2)

2004-12-05 Thread Korea PostgreSQL Users' Group
ï I found that function gen_salt() in contrib/pgcrypto had bug on win32.   I patched contrib/pgcrypto/random.c file.     pgcrypto_random.patch Description: Binary data ---(end of broadcast)--- TIP 7: don't forget to increase your free

Re: [PATCHES] patch contrib/pgcrypto for win32 (2)

2004-12-05 Thread Andrew Dunstan
Korea PostgreSQL Users' Group wrote: I found that function gen_salt() in contrib/pgcrypto had bug on win32. I patched contrib/pgcrypto/random.c file. What is the purpose of this addition? + srandom(time(NULL)); + Is resetting the seed on each call a good idea? cheers andrew

Re: [PATCHES] patch contrib/pgcrypto for win32 (2)

2004-12-05 Thread Tom Lane
"Korea PostgreSQL Users' Group" <[EMAIL PROTECTED]> writes: > SSBmb3VuZCB0aGF0IGZ1bmN0aW9uIGdlbl9zYWx0KCkgaW4gY29udHJpYi9w > Z2NyeXB0byBoYWQgYnVnIG9uIHdpbjMyLg0KDQpJIHBhdGNoZWQgY29udHJp > Yi9wZ2NyeXB0by9yYW5kb20uYyBmaWxlLg0KDQo= Unencoded text would be nicer to reply to ... But anyway, why are yo

Re: [PATCHES] [BUGS] utf-8 flag always off in plperl function arguments

2004-12-05 Thread Tom Lane
David Kamholz <[EMAIL PROTECTED]> writes: > *** plperl.c.orig Sat Dec 4 02:09:24 2004 > --- plperl.c Sat Dec 4 03:41:33 2004 > *** > *** 57,62 > --- 57,63 > #include "utils/lsyscache.h" > #include "utils/syscache.h" > #include "utils/typcache.h" > + #include "mb/p

Re: [PATCHES] patch contrib/pgcrypto for win32 (2)

2004-12-05 Thread Marko Kreen
On Mon, Dec 06, 2004 at 12:51:28AM +0900, Korea PostgreSQL Users' Group wrote: > I found that function gen_salt() in contrib/pgcrypto had bug on win32. > > I patched contrib/pgcrypto/random.c file. Could you describe the bug bit more? As for srandom, src/backend/postmaster/postmaster.c does it a

Re: [PATCHES] patch contrib/pgcrypto for win32 (2)

2004-12-05 Thread Tom Lane
Marko Kreen <[EMAIL PROTECTED]> writes: > As for srandom, src/backend/postmaster/postmaster.c does it > already, and doing it more will make matters only worse. Yes. I think we had some discussion about that already, and concluded it was a bad idea to insert ad-hoc srandom calls. > I would not o

Re: [PATCHES] patch contrib/pgcrypto for win32 (2)

2004-12-05 Thread Marko Kreen
On Sun, Dec 05, 2004 at 06:36:38PM -0500, Tom Lane wrote: > Marko Kreen <[EMAIL PROTECTED]> writes: > > I would not object to just sticking '& 255' there, > > The patch actually says '% 255' which is a whole different animal; > it still requires explaining though. Yeah, I was hinting that '& 255'