From 06297aa3cee4591b50dc7cc51353a5fca1e3ae13 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 16 Apr 2025 03:59:46 -0500 Subject: reapply special case for std file descriptors --- crypto/compat/posix_win.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crypto/compat/posix_win.c') diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c index ea229c9..246f891 100644 --- a/crypto/compat/posix_win.c +++ b/crypto/compat/posix_win.c @@ -27,6 +27,11 @@ static int is_socket(int fd) { + // Border case: Don't break std* file descriptors + if (fd < 3) + return 0; + + // All locally-allocated file descriptors will have the high bit set return (fd & 0x80000000) == 0; } -- cgit v1.2.3-55-g6feb