]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Fix a dangerous cross-thread memory access.
authorSimon Tatham <anakin@pobox.com>
Tue, 7 Apr 2015 21:17:08 +0000 (22:17 +0100)
committerSimon Tatham <anakin@pobox.com>
Tue, 7 Apr 2015 21:17:08 +0000 (22:17 +0100)
commit9fec2e773873e28f1409f5e1eefaf03483070050
tree91fe3b81e50c295090919e54ed649ad5fb8e852e
parent6f241cef2c9770abf71349dd59547b3e5b4c0301
Fix a dangerous cross-thread memory access.

When a winhandl.c input thread returns EOF to the main thread, the
latter might immediately delete the input thread's context. I
carefully wrote in a comment that in that case we had to not touch ctx
ever again after signalling to the main thread - but the test for
whether that was true, which also touched ctx, itself came _after_ the
SetEvent which sent that signal. Ahem.

Spotted by Minefield, which it looks as if I haven't run for a while.
windows/winhandl.c