summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strcat.c
diff options
context:
space:
mode:
authortb <>2023-08-14 08:07:27 +0000
committertb <>2023-08-14 08:07:27 +0000
commitd4ac55108c9f22e6e0e39bafa7fcbc1e00289aed (patch)
tree7e89c60ea4653a514eb973f7264048ef097a4bec /src/lib/libc/string/strcat.c
parent07d7f4adf74c0400d4df305a728d0afa0ed26537 (diff)
downloadopenbsd-d4ac55108c9f22e6e0e39bafa7fcbc1e00289aed.tar.gz
openbsd-d4ac55108c9f22e6e0e39bafa7fcbc1e00289aed.tar.bz2
openbsd-d4ac55108c9f22e6e0e39bafa7fcbc1e00289aed.zip
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
Diffstat (limited to 'src/lib/libc/string/strcat.c')
0 files changed, 0 insertions, 0 deletions