summaryrefslogtreecommitdiff
path: root/usr.bin/sort
diff options
context:
space:
mode:
authoranton <anton@cvs.openbsd.org>2019-05-22 18:52:15 +0000
committeranton <anton@cvs.openbsd.org>2019-05-22 18:52:15 +0000
commit3f1dd8d2335d348d20376202ec9ef7098662248e (patch)
tree83150de3ebaf48c58ed281a512f08e7baf90b000 /usr.bin/sort
parent0218d2364b8dbd7d1fac92150c117dd08e20c7b6 (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