diff options
| -rw-r--r-- | crypto/compat/posix_win.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ | |||
| 27 | static int | 27 | static int |
| 28 | is_socket(int fd) | 28 | is_socket(int fd) |
| 29 | { | 29 | { |
| 30 | // Border case: Don't break std* file descriptors | ||
| 31 | if (fd < 3) | ||
| 32 | return 0; | ||
| 33 | |||
| 34 | // All locally-allocated file descriptors will have the high bit set | ||
| 30 | return (fd & 0x80000000) == 0; | 35 | return (fd & 0x80000000) == 0; |
| 31 | } | 36 | } |
| 32 | 37 | ||
