simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Feb 20 20:52:17 GMT 2017
TL;DR:
7705fc4 Fix buffer management in strbuf_catfv.
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-20 20:52:17
commit 7705fc4470b76ec7979dc00e5c97efd720d5e335
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=7705fc4470b76ec7979dc00e5c97efd720d5e335;hp=bd65d477920b8d53833f6161e261fc6139a873ee
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Feb 20 20:30:14 2017 +0000
Fix buffer management in strbuf_catfv.
Thanks to Tim Kosse for pointing out that I had _completely_ cocked up
all the code that was supposed to enlarge the buffer in the strbuf
structure, by failing to pass in 'oldsize' to the innermost
dupvprintf_inner function by reference, so that the size was never
updated.
Fortunately, this whole mechanism was something I dashed off for the
purposes of buildinfo(), which means it's only ever used to glue
together a fixed number of compile-time string constants, for which
there turns out to be plenty to spare in the standard 512 bytes
allocated to a new strbuf. So it's at least not dangerous, though it
clearly needs to be fixed before I make the mistake of using
strbuf_catf[v] for anything else!
misc.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
More information about the tartarus-commits
mailing list