simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Tue Feb 14 23:48:16 GMT 2017


TL;DR:
  12a0808 Add an assortment of missing frees and closes.
  b03020c Fix freeing of retkey in openssh_new_read.
  f2e76e0 Remove assorted dead code.
  ac5b133 lz77_compress: change scope of variable 'hash'.
  b6b5226 uxpgnt: fix an uninitialised structure field in find_key().
  2a2434e wintime: add a precautionary memset to zero.
  bda87b3 Fix a typoed end-of-string check in testbn.
  2247065 Put in some explicit null-pointer checks.
  50965a6 Fix completely broken dialog-building functions.
  a146ab2 Tighten up bounds-checking of agent responses.
  bec33b2 Properly check the lengths of Unix-socket pathnames.
  991d304 Fixes for winelib building (used by our Coverity build).

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2017-02-14 23:48:16

commit 12a080874fd9e5a4ae0a6dc39fb54b152927075d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=12a080874fd9e5a4ae0a6dc39fb54b152927075d;hp=33f4c8303f78f0c6035779f731d6a668b01b8c16
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 20:42:26 2017 +0000

    Add an assortment of missing frees and closes.
    
    Coverity's resource-leak checker is on the ball as usual.

 cmdgen.c           |  2 ++
 pageant.c          | 22 ++++++++++++++++++++++
 pscp.c             |  1 +
 ssh.c              |  1 +
 sshpubk.c          |  1 +
 unix/gtkdlg.c      |  1 +
 unix/gtkfont.c     |  1 +
 unix/uxpgnt.c      |  2 ++
 windows/winhelp.c  |  1 +
 windows/winproxy.c |  4 ++++
 windows/winser.c   |  1 +
 11 files changed, 37 insertions(+)

commit b03020cab9297c53d1a65a497910ea7a988b94e7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b03020cab9297c53d1a65a497910ea7a988b94e7;hp=12a080874fd9e5a4ae0a6dc39fb54b152927075d
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 21:31:12 2017 +0000

    Fix freeing of retkey in openssh_new_read.
    
    Now it's always freed in the cleanup epilogue (unless we're returning
    it), rather than ad-hoc earlier in the code. That should make it more
    reliably freed on error paths.

 import.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

commit f2e76e07dad155a2fdc68930a2e96d6aa2682391
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f2e76e07dad155a2fdc68930a2e96d6aa2682391;hp=b03020cab9297c53d1a65a497910ea7a988b94e7
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 20:22:05 2017 +0000

    Remove assorted dead code.
    
    Assignments that are overwritten shortly afterwards and never used,
    and a completely unused variable. Also, the bogus array access in
    testbn.c could have actually accessed one beyond the array limit
    (though of course it's only in a test harness).

 import.c           | 8 --------
 sshzlib.c          | 1 -
 testbn.c           | 2 --
 windows/winutils.c | 2 +-
 4 files changed, 1 insertion(+), 12 deletions(-)

commit ac5b13398f47c99cc189eed4538abcccc3c18300
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=ac5b13398f47c99cc189eed4538abcccc3c18300;hp=f2e76e07dad155a2fdc68930a2e96d6aa2682391
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 22:13:24 2017 +0000

    lz77_compress: change scope of variable 'hash'.
    
    This makes it clearer that it doesn't persist beyond this block, and
    would have made it much more obvious that the assignment to it removed
    in the previous commit was pointless.

 sshzlib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit b6b52269e1085d9a58adf2f0f86f96fd96fa3199
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b6b52269e1085d9a58adf2f0f86f96fd96fa3199;hp=ac5b13398f47c99cc189eed4538abcccc3c18300
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 20:26:03 2017 +0000

    uxpgnt: fix an uninitialised structure field in find_key().
    
    Thanks, Coverity - I must have been lucky that Unix Pageant in client
    mode hasn't so far happened to have this field come out non-NULL, or
    else pageant_pubkey_copy would have tried to dupstr a garbage pointer.

 unix/uxpgnt.c | 2 ++
 1 file changed, 2 insertions(+)

commit 2a2434e0cc91492ce56ce4360aacb7737bb1eebe
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2a2434e0cc91492ce56ce4360aacb7737bb1eebe;hp=b6b52269e1085d9a58adf2f0f86f96fd96fa3199
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 20:29:38 2017 +0000

    wintime: add a precautionary memset to zero.
    
    Coverity observes that sometimes 'struct tm' can have other fields
    (e.g. glibc's tm_gmtoff), so it's as well to make sure we initialise
    the whole thing to zero.

 windows/wintime.c | 2 ++
 1 file changed, 2 insertions(+)

commit bda87b39e40ec4e75309cdf778dfc9cd339fdeeb
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=bda87b39e40ec4e75309cdf778dfc9cd339fdeeb;hp=2a2434e0cc91492ce56ce4360aacb7737bb1eebe
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 20:39:22 2017 +0000

    Fix a typoed end-of-string check in testbn.
    
    I was testing the actual pointer against NULL instead of testing the
    pointed-to character against NUL.

 testbn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 2247065d0fa88daf8499eb937ee60e8e3df22261
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2247065d0fa88daf8499eb937ee60e8e3df22261;hp=bda87b39e40ec4e75309cdf778dfc9cd339fdeeb
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 20:47:16 2017 +0000

    Put in some explicit null-pointer checks.
    
    I think these were not strictly necessary, since passing a null
    pointer to access(2) would have resulted in EINVAL rather than a
    segfault. But it's clearer to put them in (and keeps static checkers a
    bit happier).

 unix/uxstore.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 50965a6411b8da9301501e91262bfe6cf8c808ae
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=50965a6411b8da9301501e91262bfe6cf8c808ae;hp=2247065d0fa88daf8499eb937ee60e8e3df22261
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 21:15:02 2017 +0000

    Fix completely broken dialog-building functions.
    
    The loops that were supposed to count up the number of buttons in the
    variadic argument list forgot to increment the counter.
    
    On the other hand, these functions aren't actually _used_ anywhere in
    the current code - looks as if commit 616c837cf was the last time they
    were seen - but manual dialog stuff like PuTTYgen might yet find a use
    for them in future.

 windows/winctrls.c | 2 ++
 1 file changed, 2 insertions(+)

commit a146ab2e7aa984f8f5d7ec97e14bbf7ebeb30823
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a146ab2e7aa984f8f5d7ec97e14bbf7ebeb30823;hp=50965a6411b8da9301501e91262bfe6cf8c808ae
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 21:52:28 2017 +0000

    Tighten up bounds-checking of agent responses.
    
    I think an agent sending a string length exceeding the buffer bounds
    by less than 4 could have made PuTTY read beyond its own buffer end.
    Not that I really think a hostile SSH agent is likely to be attacking
    PuTTY, but it's as well to fix these things anyway!

 ssh.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

commit bec33b23119d9363854a2d0b4f4ca0fe893827aa
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=bec33b23119d9363854a2d0b4f4ca0fe893827aa;hp=a146ab2e7aa984f8f5d7ec97e14bbf7ebeb30823
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 21:59:52 2017 +0000

    Properly check the lengths of Unix-socket pathnames.
    
    If something is too long to fit in a sun_addr, we should spot that
    well in advance and not try.

 unix/uxagentc.c | 4 ++--
 unix/uxnet.c    | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

commit 991d30412d0911e7727a852d0a00ae0f1bec1b3e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=991d30412d0911e7727a852d0a00ae0f1bec1b3e;hp=bec33b23119d9363854a2d0b4f4ca0fe893827aa
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Feb 14 23:19:13 2017 +0000

    Fixes for winelib building (used by our Coverity build).
    
    Avoided referring to some functions and header files that aren't there
    in the winelib world (_vsnprintf, _stricmp, SecureZeroMemory,
    multimon.h), and worked around a really amazingly annoying issue in
    which Winelib objects to you using the type 'fd_set' unless you
    included winsock2.h before stdlib.h.

 misc.c             |  2 +-
 windows/window.c   |  4 ++++
 windows/winnet.c   | 11 +++++++++++
 windows/winsftp.c  |  3 +++
 windows/winstuff.h | 26 +++++++++++++++++++++++---
 5 files changed, 42 insertions(+), 4 deletions(-)



More information about the tartarus-commits mailing list