diff options
author | anton <anton@cvs.openbsd.org> | 2019-05-22 18:52:15 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2019-05-22 18:52:15 +0000 |
commit | 3f1dd8d2335d348d20376202ec9ef7098662248e (patch) | |
tree | 83150de3ebaf48c58ed281a512f08e7baf90b000 /usr.bin/sort | |
parent | 0218d2364b8dbd7d1fac92150c117dd08e20c7b6 (diff) |
A wscons device may only be opened in read/write mode once. However,
after checking for exclusive access, malloc() can sleep in
wsevent_init() opening up for a potential race where more than one
thread may be able open the device. Prevent this by checking if the race
was won after calling malloc().
While here, switch to mallocarray as proposed by both cheloha@ and mpi@
ok mpi@
Diffstat (limited to 'usr.bin/sort')
0 files changed, 0 insertions, 0 deletions