diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-11 19:06:46 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-11 19:06:46 +0000 |
commit | a1a64bb7c32f98135deab61c707f7305b4273b7c (patch) | |
tree | 9c02de6be79dc744c15c5062f92b56f805216979 | |
parent | e82f7e9e7e4238825a187921a749247a7c517789 (diff) | |
download | postgresql-a1a64bb7c32f98135deab61c707f7305b4273b7c.tar.gz postgresql-a1a64bb7c32f98135deab61c707f7305b4273b7c.zip |
Further tweaking of Win32-specific random code. Marko Kreen
-rw-r--r-- | contrib/pgcrypto/random.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/pgcrypto/random.c b/contrib/pgcrypto/random.c index 501e36f1314..059fad3c8b3 100644 --- a/contrib/pgcrypto/random.c +++ b/contrib/pgcrypto/random.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.13 2005/07/11 17:00:03 tgl Exp $ + * $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.14 2005/07/11 19:06:46 tgl Exp $ */ #include "postgres.h" @@ -104,7 +104,6 @@ try_dev_random(uint8 *dst) #define TRY_WIN32_GENRAND #define TRY_WIN32_PERFC -#define _WIN32_WINNT 0x0400 #include <windows.h> #include <wincrypt.h> @@ -128,7 +127,7 @@ static uint8 * try_win32_genrand(uint8 *dst) res = CryptGenRandom(h, RND_BYTES, dst); if (res == TRUE) - dst += len; + dst += RND_BYTES; CryptReleaseContext(h, 0); return dst; |