Skip site navigation (1) Skip section navigation (2)

Re: patch contrib/pgcrypto for win32 (2) - bug report

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: patch contrib/pgcrypto for win32 (2) - bug report
Date: 2004-12-06 16:32:25
Message-ID: 2301.1102350745@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
"Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr> writes:
> this bug is only for win32 system.
> On mingw32 random() function have to be initialized by srandom().
> so, I put srandom(time(NULL)) line.

But there is already an srandom() call during backend startup.

> Because random() function return integer (2byte), this return integer number need filtering.
> so, I changed random() % 255 line.

But the value will automatically be converted to a single byte when it's
stored into a uint8 variable.

> plz, check and properly fix this bug.

I see no bug here.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Marko KreenDate: 2004-12-06 19:20:45
Subject: Re: patch contrib/pgcrypto for win32 (2) - bug report
Previous:From: Korea PostgreSQL Users' GroupDate: 2004-12-06 16:18:41
Subject: Re: patch contrib/pgcrypto for win32 (2) - bug report

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group