]> granicus.if.org Git - curl/commit
tool_cb_wrt: fix writing to Windows null device NUL
authorJay Satiro <raysatiro@yahoo.com>
Tue, 26 Mar 2019 07:31:30 +0000 (03:31 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 26 Mar 2019 07:31:30 +0000 (03:31 -0400)
commitf5bc578f4cdfdc6c708211dfc2962a0e9d79352d
tree7bf03f02d084f63f85daabcb1e8cb9b079a1201c
parent2bcdf722b8131f3d4bd433f46794e74154534604
tool_cb_wrt: fix writing to Windows null device NUL

- Improve console detection.

Prior to this change WriteConsole could be called to write to a handle
that may not be a console, which would cause an error. This issue is
limited to character devices that are not also consoles such as the null
device NUL.

Bug: https://github.com/curl/curl/issues/3175#issuecomment-439068724
Reported-by: Gisle Vanem
src/tool_cb_wrt.c