OpenBSD CVS

CVS log for src/usr.bin/nc/netcat.c


[BACK] Up to [local] / src / usr.bin / nc

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_7_4_BASE


Revision 1.226 / (download) - annotate - [select for diffs], Mon Aug 14 08:07:27 2023 UTC (9 months, 2 weeks ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.225: +9 -3 lines
Diff to previous 1.225 (colored)

netcat: avoid issuing syscalls on fd -1

In case a socket error condition occurs, readwrite() invalidates the
corresponding fd. Later on, readwrite() may still issue a syscall on
it. Avoid that by adding a couple of checks for fd == -1.

Reported and fix suggested by Leah Neukirchen.
Fixes https://github.com/libressl/openbsd/issues/143

"looks right" deraadt

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.