diff options
author | bcook <> | 2016-06-30 12:17:29 +0000 |
---|---|---|
committer | bcook <> | 2016-06-30 12:17:29 +0000 |
commit | 04659cfbf6434208cea373c44b6482783a1a7299 (patch) | |
tree | 1befc101a690cd02f9a8dd0a47bdc267d399819f /src/lib/libc/string/strnlen.c | |
parent | b6bab7cc9d65f0b834c6e530b4a3c7252d243302 (diff) | |
download | openbsd-04659cfbf6434208cea373c44b6482783a1a7299.tar.gz openbsd-04659cfbf6434208cea373c44b6482783a1a7299.tar.bz2 openbsd-04659cfbf6434208cea373c44b6482783a1a7299.zip |
Tighten behavior of _rs_allocate on Windows.
For Windows, we are simply using calloc, which has two annoyances:
the memory has more permissions than needed by default, and it comes
from the process heap, which looks like a memory leak since this memory
is rightfully never freed.
This switches _rs_alloc on Windows to use VirtualAlloc, which restricts the
memory to READ|WRITE and keeps the memory out of the process heap.
ok deraadt@
Diffstat (limited to 'src/lib/libc/string/strnlen.c')
0 files changed, 0 insertions, 0 deletions