libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit 8ca19dcc2e985e4feb71147c79b348713d17e98a
parent 5cf06fa4b6a3818921166c08c53e86edde8fa8a0
Author: Evgeny Grin <k2k@drgrin.dev>
Date:   Wed, 30 Apr 2025 19:29:54 +0300

mhd_read_file: added check for extra error code on W32

Diffstat:
Msrc/mhd2/mhd_read_file.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mhd2/mhd_read_file.c b/src/mhd2/mhd_read_file.c @@ -149,7 +149,8 @@ mhd_read_file (int file_fd, DWORD resReadSize; *size_filled = 0; - if (INVALID_HANDLE_VALUE == w_hndl) + if ((((intptr_t) -2) == sys_fd) || + (INVALID_HANDLE_VALUE == w_hndl)) return mhd_FILE_READ_ERROR; memset (&ovrlp, 0, sizeof(ovrlp));