w32: Better protect the IO-system's fd_table
authorWerner Koch <wk@gnupg.org>
Wed, 9 Nov 2016 07:33:02 +0000 (08:33 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 9 Nov 2016 07:34:15 +0000 (08:34 +0100)
commit10f2e1c30be651e74a03f4563a9f212d7416adb3
tree8a63e000bfe6725521e635fd8ba94ad39c829653
parent3509cf2f9846360848b6c08d36cbca18373c935e
w32: Better protect the IO-system's fd_table

* src/w32-io.c (fd_table_lock): New.
(new_fd): Lock allocation of a new slot.
(release_fd): Lock deallocation of a slot.
--

Note that we lock only the allocation but not the sanitiy checks we do
further down in the code.

Signed-off-by: Werner Koch <wk@gnupg.org>
src/w32-io.c