]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: fhandler_pipe::get_query_hdl_per_process: avoid a crash
authorKen Brown <kbrown@cornell.edu>
Sun, 26 Dec 2021 21:42:26 +0000 (16:42 -0500)
committerKen Brown <kbrown@cornell.edu>
Sun, 26 Dec 2021 23:29:23 +0000 (18:29 -0500)
commit0ce992c1e40f843d5f264e87908a6decfd6681d1
tree4ed473575becd2bc74eff4e7e3a947b53363f6af
parent3328740799d7c229293f1fcbd26cbd1e4d268e70
Cygwin: fhandler_pipe::get_query_hdl_per_process: avoid a crash

NtQueryInformationProcess(ProcessHandleInformation) can return
STATUS_SUCCESS with invalid handle data for certain processes
("minimal" processes on Windows 10).  This can cause a crash when
there's an attempt to access that data.  Fix that by setting
NumberOfHandles to zero before calling NtQueryInformationProcess.

Addresses: https://cygwin.com/pipermail/cygwin-patches/2021q4/011611.html
winsup/cygwin/fhandler_pipe.cc
winsup/cygwin/release/3.3.4
This page took 0.032786 seconds and 5 git commands to generate.