]> git.ipfire.org Git - thirdparty/openssh-portable.git/commit
partial sync of regress/netcat.c with upstream
authortobias <tobias@openbsd.org>
Thu, 26 Mar 2015 21:22:50 +0000 (21:22 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 29 May 2020 04:47:50 +0000 (14:47 +1000)
commitd6a81050ace2630b06c3c6dd39bb4eef5d1043f8
treec595ab2e2e47c021ffdf4c3711fc30118d58f6d2
parentbf3893dddd35e16def04bf48ed2ee1ad695b8f82
partial sync of regress/netcat.c with upstream

The code in socks.c writes multiple times in a row to a socket. If the socket becomes invalid between these calls (e.g. connection closed), write will throw SIGPIPE. With this patch, SIGPIPE is ignored so we can handle write's -1 return value (errno will be EPIPE). Ultimately, it leads to program exit, too -- but with nicer error message. :)

with input by and ok djm
regress/netcat.c