diff options
author | tb <> | 2023-08-14 08:07:27 +0000 |
---|---|---|
committer | tb <> | 2023-08-14 08:07:27 +0000 |
commit | d4ac55108c9f22e6e0e39bafa7fcbc1e00289aed (patch) | |
tree | 7e89c60ea4653a514eb973f7264048ef097a4bec /src/lib/libc/stdlib/lrand48.c | |
parent | 07d7f4adf74c0400d4df305a728d0afa0ed26537 (diff) | |
download | openbsd-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/stdlib/lrand48.c')
0 files changed, 0 insertions, 0 deletions