I believe a positive but nonexistent fd passed to cygheap_getfd results in a
-1, so that case should be covered by this patch.
However I botched the coding for mq_close. That fix plus anything else needed
per reviews will appear as a v2.
Thanks & Regards,
..mark
Jan 15, 2025 3:35:43 AM Christian
Mark Geisert wrote:
Validate the fd returned by cygheap_getfd operating on given mqd.
Reported-by: Christian Franke
Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257090.html
Signed-off-by: Mark Geisert
Fixes: 46f3b0ce85a9 (Cygwin: POSIX msg queues: move all mq_* functionality int
Validate the fd returned by cygheap_getfd operating on given mqd.
Reported-by: Christian Franke
Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257090.html
Signed-off-by: Mark Geisert
Fixes: 46f3b0ce85a9 (Cygwin: POSIX msg queues: move all mq_* functionality into
fhandler_mqueue)
-