[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Rich Salz
rsalz at openssl.org
Fri Oct 13 18:51:13 UTC 2017
The branch OpenSSL_1_0_2-stable has been updated
via f6f9a735cc691a57c01c0c99aacce86fd9138a05 (commit)
from 86ccadf5bb4d59f2d6acac9b4edd0ae82c580ab4 (commit)
- Log -----------------------------------------------------------------
commit f6f9a735cc691a57c01c0c99aacce86fd9138a05
Author: Rich Salz <rsalz at openssl.org>
Date: Wed Oct 4 15:00:23 2017 -0400
Don't use colortable; avoid Win32 overwrite
Thanks to Jo Hornsby for reporting this and helping with the fix.
Reviewed-by: Andy Polyakov <appro at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4464)
-----------------------------------------------------------------------
Summary of changes:
crypto/rand/rand_win.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 3c5b6e1..b4be309 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -704,14 +704,13 @@ static void readscreen(void)
hBitmap = CreateCompatibleBitmap(hScrDC, w, n);
/* Get bitmap properties */
- GetObject(hBitmap, sizeof(BITMAP), (LPSTR) & bm);
- size = (unsigned int)bm.bmWidthBytes * bm.bmHeight * bm.bmPlanes;
-
- bi.biSize = sizeof(BITMAPINFOHEADER);
+ GetObject(hBitmap, sizeof(bm), (LPSTR)&bm);
+ size = (unsigned int)4 * bm.bmHeight * bm.bmWidth;
+ bi.biSize = sizeof(bi);
bi.biWidth = bm.bmWidth;
bi.biHeight = bm.bmHeight;
- bi.biPlanes = bm.bmPlanes;
- bi.biBitCount = bm.bmBitsPixel;
+ bi.biPlanes = 1;
+ bi.biBitCount = 32;
bi.biCompression = BI_RGB;
bi.biSizeImage = 0;
bi.biXPelsPerMeter = 0;
@@ -727,7 +726,7 @@ static void readscreen(void)
/* Copy the bits of the current line range into the buffer */
GetDIBits(hScrDC, hBitmap, y, n,
- bmbits, (BITMAPINFO *) & bi, DIB_RGB_COLORS);
+ bmbits, (LPBITMAPINFO)&bi, DIB_RGB_COLORS);
/* Get the hash of the bitmap */
MD(bmbits, size, md);
More information about the openssl-commits
mailing list