simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Dec 8 21:11:09 GMT 2018


TL;DR:
  3322d4c0 Remove a load of obsolete printf string limits.

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:           2018-12-08 21:11:09

commit 3322d4c082455f228e20a4d5553bc4b3448deb92
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3322d4c082455f228e20a4d5553bc4b3448deb92;hp=e08641c912e4a6144ea61b38e9896953ca4b0dda
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Dec 8 21:03:51 2018 +0000

    Remove a load of obsolete printf string limits.
    
    In the previous commit I happened to notice a %.150s in a ppl_logevent
    call, which was probably an important safety precaution a couple of
    decades ago when that format string was being used for an sprintf into
    a fixed-size buffer, but now it's just pointless cruft.
    
    This commit removes all printf string formatting directives with a
    compile-time fixed size, with the one exception of a %.3s used to cut
    out a 3-letter month name in scpserver.c. In cases where the format
    string in question was already going to an arbitrary-length function
    like dupprintf or ppl_logevent, that's all I've done; in cases where
    there was still a fixed-size buffer, I've replaced it with a dynamic
    buffer and dupprintf.

 ssh1login.c      |  5 ++--
 ssh2bpp.c        |  8 +++---
 ssh2userauth.c   |  4 +--
 unix/uxpty.c     | 30 ++++++++++++++--------
 windows/windlg.c |  2 +-
 windows/window.c | 77 ++++++++++++++++++++++++++++++--------------------------
 6 files changed, 70 insertions(+), 56 deletions(-)



More information about the tartarus-commits mailing list