Possible issue with check_dir_not_empty

Bernhard Übelacker bernhardu@mailbox.org
Sat Nov 16 22:36:06 GMT 2024


Hello everyone,

Is is about the buffer allocated in check_dir_not_empty.

The pointer pfni gets allocated the buffer at the begin,
and is used in the NtQueryDirectoryFile call before the loops.
In the loop the pointer pfni is also used as iterator.
Therefore it holds no longer the initial buffer at the call
to NtQueryDirectoryFile in the while conditition at the bottom.

Attached is a possible modification to always use the allocated buffer.

Kind regards,
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Cygwin-check_dir_not_empty-Avoid-leaving-the-allocat.patch
Type: text/x-patch
Size: 2659 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20241116/28fcc345/attachment.bin>


More information about the Cygwin mailing list