summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/getopt_long.c
diff options
context:
space:
mode:
authorbcook <>2016-06-30 12:17:29 +0000
committerbcook <>2016-06-30 12:17:29 +0000
commit04659cfbf6434208cea373c44b6482783a1a7299 (patch)
tree1befc101a690cd02f9a8dd0a47bdc267d399819f /src/lib/libc/stdlib/getopt_long.c
parentb6bab7cc9d65f0b834c6e530b4a3c7252d243302 (diff)
downloadopenbsd-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/stdlib/getopt_long.c')
0 files changed, 0 insertions, 0 deletions