]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - windows/winsftp.c
Fix uninitialised variable in two Windows event loops.
authorSimon Tatham <anakin@pobox.com>
Sat, 22 Nov 2014 10:18:16 +0000 (10:18 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 22 Nov 2014 15:25:38 +0000 (15:25 +0000)
commitb6c2346173ee1a8b8cd6ec045bb80243e47400f2
treedce5488e0f1e2ac0faebf419fb2cd8ccde949512
parent068b67d2f6e9b186b3107ebcb1e88a141b7b5ebc
Fix uninitialised variable in two Windows event loops.

If (Msg)WaitForMultipleObjects returns WAIT_TIMEOUT, we expect 'next'
to have been initialised. This can occur without having called
run_timers(), if a toplevel callback was pending, so we can't expect
run_timers to have reliably initialised 'next'.

I'm not actually convinced this could have come up in either of the
affected programs (Windows PSFTP and Plink), due to the list of things
toplevel callbacks are currently used for, but it certainly wants
fixing anyway for the future.

Spotted by Coverity.
windows/winplink.c
windows/winsftp.c