Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita1a64bb

Browse files
committed
Further tweaking of Win32-specific random code. Marko Kreen
1 parente82f7e9 commita1a64bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎contrib/pgcrypto/random.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.13 2005/07/1117:00:03 tgl Exp $
29+
* $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.14 2005/07/1119:06:46 tgl Exp $
3030
*/
3131

3232
#include"postgres.h"
@@ -104,7 +104,6 @@ try_dev_random(uint8 *dst)
104104
#defineTRY_WIN32_GENRAND
105105
#defineTRY_WIN32_PERFC
106106

107-
#define_WIN32_WINNT 0x0400
108107
#include<windows.h>
109108
#include<wincrypt.h>
110109

@@ -128,7 +127,7 @@ static uint8 * try_win32_genrand(uint8 *dst)
128127

129128
res=CryptGenRandom(h,RND_BYTES,dst);
130129
if (res== TRUE)
131-
dst+=len;
130+
dst+=RND_BYTES;
132131

133132
CryptReleaseContext(h,0);
134133
returndst;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp