- Synchronize compat/getentropy_win.c with version 1.5 from

OpenBSD, no changes but makes the file, comments, identical.
This commit is contained in:
W.C.A. Wijngaards 2019-11-20 13:08:43 +01:00
parent 623dba975a
commit 20dd979d00
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD$ */ /* $OpenBSD: getentropy_win.c,v 1.5 2016/08/07 03:27:21 tb Exp $ */
/* /*
* Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org> * Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org>
@ -15,6 +15,9 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Emulation of getentropy(2) as documented at:
* http://man.openbsd.org/getentropy.2
*/ */
#include <windows.h> #include <windows.h>
@ -37,7 +40,7 @@ getentropy(void *buf, size_t len)
if (len > 256) { if (len > 256) {
errno = EIO; errno = EIO;
return -1; return (-1);
} }
if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,

View File

@ -19,6 +19,8 @@
- Fix Integer Underflow in Regional Allocator, - Fix Integer Underflow in Regional Allocator,
reported by X41 D-Sec. reported by X41 D-Sec.
- Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD. - Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD.
- Synchronize compat/getentropy_win.c with version 1.5 from
OpenBSD, no changes but makes the file, comments, identical.
19 November 2019: Wouter 19 November 2019: Wouter
- Fix CVE-2019-18934, shell execution in ipsecmod. - Fix CVE-2019-18934, shell execution in ipsecmod.