lp:~vcs-imports/putty/master

Created by Colin Watson on 2016-10-02 and last modified on 2019-10-20
Get this branch:
bzr branch lp:~vcs-imports/putty/master

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
VCS imports
Project:
PuTTY
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.tartarus.org/simon/putty.git.

The next import is scheduled to run in 5 hours.

Last successful import was 48 minutes ago.

Import started 48 minutes ago on izar and finished 48 minutes ago taking 20 seconds — see the log
Import started 6 hours ago on izar and finished 6 hours ago taking 20 seconds — see the log
Import started 12 hours ago on alnitak and finished 12 hours ago taking 20 seconds — see the log
Import started 18 hours ago on izar and finished 18 hours ago taking 20 seconds — see the log
Import started on 2019-10-21 on izar and finished on 2019-10-21 taking 20 seconds — see the log
Import started on 2019-10-20 on alnitak and finished on 2019-10-20 taking 20 seconds — see the log
Import started on 2019-10-20 on izar and finished on 2019-10-20 taking 20 seconds — see the log
Import started on 2019-10-20 on izar and finished on 2019-10-20 taking 15 seconds — see the log
Import started on 2019-10-20 on izar and finished on 2019-10-20 taking 15 seconds — see the log
Import started on 2019-10-19 on izar and finished on 2019-10-19 taking 20 seconds — see the log

Recent revisions

5552. By Simon Tatham <email address hidden> on 2019-10-20

GTK: Refresh backing surface when border is reconfigured.

If you go to Change Settings in Unix PuTTY or pterm, and change the
'Gap between text and window edge' setting but not the width and
height, then change_settings_menuitem() correctly sets the physical
window to a new size, but drawing_area_setup() was not recreating the
backing surface / pixmap in the same way, because it hadn't spotted
that the border size might be relevant.

Now I unconditionally work out what the exact size of the backing
surface _ought_ to be, before reaching the potential early exit path,
and never take the early exit if the backing area needs resizing for
any reason at all.

(I think this probably ought to have been part of commit 528513dde.)

5551. By Simon Tatham <email address hidden> on 2019-10-20

Remove extra braces in drawing_area_setup. (NFC)

I'm about to rearrange this function, and the patch that actually does
work will be easier to read if mass reindentation isn't combined with
it.

The braces I've just removed were necessary when we hadn't yet
committed to requiring (most of) C99 from all our build platforms. Now
they aren't.

5550. By Simon Tatham <email address hidden> on 2019-10-15

Fix build failure on GTK 1.

This should have been part of commit e790adec4, but wasn't.

5549. By Simon Tatham <email address hidden> on 2019-10-14

Make dupcat() into a variadic macro.

Up until now, it's been a variadic _function_, whose argument list
consists of 'const char *' ASCIZ strings to concatenate, terminated by
one containing a null pointer. Now, that function is dupcat_fn(), and
it's wrapped by a C99 variadic _macro_ called dupcat(), which
automatically suffixes the null-pointer terminating argument.

This has three benefits. Firstly, it's just less effort at every call
site. Secondly, it protects against the risk of accidentally leaving
off the NULL, causing arbitrary words of stack memory to be
dereferenced as char pointers. And thirdly, it protects against the
more subtle risk of writing a bare 'NULL' as the terminating argument,
instead of casting it explicitly to a pointer. That last one is
necessary because C permits the macro NULL to expand to an integer
constant such as 0, so NULL by itself may not have pointer type, and
worse, it may not be marshalled in a variadic argument list in the
same way as a pointer. (For example, on a 64-bit machine it might only
occupy 32 bits. And yet, on another 64-bit platform, it might work
just fine, so that you don't notice the mistake!)

I was inspired to do this by happening to notice one of those bare
NULL terminators, and thinking I'd better check if there were any
more. Turned out there were quite a few. Now there are none.

5548. By Simon Tatham <email address hidden> on 2019-10-01

Fix handling of string-typed address from SOCKS5 server.

In the variable-length address slot, the main SOCKS5 reply packet can
contain a binary IP address (4- or 16-byte for v4/v6 respectively), or
a string intended to be interpreted as a domain name.

I was trying out the Python SOCKS5 proxy 'pproxy' today, which sends a
string-typed reply if you send it a string-typed domain name to
connect to. This caused me to notice that PuTTY mishandles the latter
case, by failing to account for the prefix length byte of that string
when computing the total size of the reply packet. So we would
misinterpret the final byte of its reply packet as the initial byte of
the actual connection, causing us to fail to recognise the SSH greeting.

5547. By Simon Tatham <email address hidden> on 2019-09-22

Update version number for 0.73 release.

5546. By Simon Tatham <email address hidden> on 2019-09-20

Fix use-after-free on SSH1_MSG_DISCONNECT.

Thanks to Ulrich Jannet for pointing this out: in
ssh2_connection_filter_queue, when we process a disconnect message, we
carefully avoid dereferencing the input 'ppl' pointer after
ssh_remote_error returns, because it will have been freed. But
ssh1_connection_filter_queue didn't have the same safety precaution.

5545. By Simon Tatham <email address hidden> on 2019-09-19

winnet: use SO_EXCLUSIVEADDRUSE for listening sockets.

Thanks to Patrick Stekovic for pointing out that, unlike sensible IP
stacks, Windows requires a non-default socket option to prevent a
second application from binding to a port you were already listening
on, causing some of your incoming connections to be diverted.

This replaces the previous setsockopt that enabled SO_REUSEADDR, which
I put there a long time ago in order to fix an annoying behaviour if
you used the same listening socket twice in rapid succession (e.g. for
successive PuTTYs forwarding the same port) and the second one failed
to bind the listening port because a left-over connection from the
first one was still in TIME_WAIT and causing the port number to be
marked as used.

As far as I can see, SO_EXCLUSIVEADDRUSE and SO_REUSEADDR are mutually
exclusive - if I try to set both, either way round, then setsockopt
returns failure on the second one - so if I have to set the former
then I _can't_ set the latter. And fortunately, re-testing on Windows
10, the TIME_WAIT problem that SO_REUSEADDR was supposed to solve
doesn't seem to exist any more: I deliberately tried listening on a
port that had a TIME_WAIT connection sitting on it, and it worked for
me even without SO_REUSEADDR.

(I can't remember now whether I definitely confirmed the TIME_WAIT
problem on a previous version of Windows, or whether I just assumed it
would happen on Windows in the same way as Linux, where I definitely
do remember observing it.)

While I'm changing that setsockopt call, I've also fixed its 'on'
parameter so that it's a BOOL rather than an int, in accordance with
the docs for WinSock setsockopt.

5544. By Simon Tatham <email address hidden> on 2019-09-19

Don't call term_bracketed_paste_stop before pasted data.

The redesign in commit 9fccb065a arranged that all keystroke data goes
via term_keyinput_internal, which calls term_bracketed_paste_stop just
in case the keystroke had interrupted an in-progress paste.

But, embarrassingly, I forgot that _pasted_ data also goes via
term_keyinput_internal, and bracketed paste mode certainly should not
be terminated before _that_ is sent! I should have conditionalised the
call to term_bracketed_paste_stop on the 'interactive' flag parameter,
which is precisely there to tell the difference between pastes and
true keyboard input.

5543. By Simon Tatham <email address hidden> on 2019-09-19

Windows Plink: fix segfault at startup when connection-sharing.

The message "Reusing a shared connection to this server" is sent to
the seat's output method during the call to ssh_init. In Windows
Plink, that output method wants to talk to the BinarySink stderr_bs
(or stdout_bs, but for this particular message, stderr). So we have to
have already set up stderr_bs by the time the backend init function is
called.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers