simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Tue Apr 7 22:20:34 BST 2015


TL;DR:
  6f241ce Clean up a stale foreign handle in winnps.c.
  9fec2e7 Fix a dangerous cross-thread memory access.

Repository:     git://git.tartarus.org/simon/putty.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-04-07 22:20:34

commit 6f241cef2c9770abf71349dd59547b3e5b4c0301
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=6f241cef2c9770abf71349dd59547b3e5b4c0301;hp=2422b18a0f4d758f0660503b068dd19d92de4906
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Apr 7 21:54:41 2015 +0100

    Clean up a stale foreign handle in winnps.c.
    
    I had set up an event object for signalling incoming connections to
    the named pipe, and then called handle_add_foreign_event to get that
    event object watched for connections - but when I closed down the
    listening pipe, I deleted the event object without also cancelling
    that foreign-event handle, so that winhandl.c would potentially call
    the callback for a destroyed object.

 windows/winnps.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

commit 9fec2e773873e28f1409f5e1eefaf03483070050
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=9fec2e773873e28f1409f5e1eefaf03483070050;hp=6f241cef2c9770abf71349dd59547b3e5b4c0301
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Apr 7 22:17:08 2015 +0100

    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 |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)



More information about the tartarus-commits mailing list