simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Wed Nov 25 18:33:17 GMT 2015


TL;DR:
  6c9aa9b Avoid passing -1 as an fd to uxsel_set().

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-11-25 18:33:17

commit 6c9aa9be32a44d1b2ffd02d211e6e76ec328ee76
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=6c9aa9be32a44d1b2ffd02d211e6e76ec328ee76;hp=50d73d95dacb1f9003151f226552e38cdcbb657b
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Nov 25 18:18:45 2015 +0000

    Avoid passing -1 as an fd to uxsel_set().
    
    I'd missed out an if statement in the Unix proxy stderr code
    introduced by commit 297efff30, causing ret->cmd_err to be passed to
    uxsel_set even when it was -1 (which happened in the non-GUI tools).
    Unfortunately, putting a negative fd into the uxsel tree has really
    bad effects, because the first_fd / next_fd interface returns a
    negative number to signal end-of-list - and since the uxsel tree is
    sorted by fd, that happens _immediately_.
    
    Added the missing if statement, and also an assertion to make sure we
    never pass -1 to uxsel_set by mistake again!

 unix/uxproxy.c |    3 ++-
 unix/uxsel.c   |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list