1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00
putty-source/windows
Simon Tatham 97b39eeca3 Work around console I/O size limit on Windows 7.
A user reports that the ReadFile call in console_get_userpass_input
fails with ERROR_NOT_ENOUGH_MEMORY on Windows 7, and further reports
that this problem only happens if you tell ReadFile to read more than
31366 bytes in a single call.

That seems to be a thing that other people have found as well: I
turned up a similar workaround in Ruby's Win32 support module, except
that there it's for WriteConsole. So I'm reducing my arbitrary read
size of 64K to 16K, which is well under that limit.

This issue became noticeable in PuTTY as of the recent commit
cd6bc14f0, which reworked console_get_userpass_input to use strbufs.
Previously we were trying to read an amount proportional to the
existing size of the buffer, so as to grow the buffer exponentially to
save quadratic-time reallocation. That was OK in practice, since the
initial read size was nice and small. But in principle, the same bug
was present in that version of the code, just latent - if we'd ever
been called on to read a _really large_ amount of data, then
_eventually_ the input size parameter to ReadFile would have grown
beyond that mysterious limit!

(cherry picked from commit 7b79d22021)
2020-02-09 08:51:37 +00:00
..
installer.wxs Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
msiplatform.py Fix platform field in Windows on Arm installers. 2018-08-21 07:17:06 +01:00
pageant.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pageant.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
pageant.rc Grow the Windows Licence dialog. 2019-03-18 20:32:55 +00:00
pageants.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
plink.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
pscp.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pscp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
psftp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
putty.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
putty.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
putty.rc Tweak version string resources for EMBED_CHM. 2019-03-16 12:25:23 +00:00
puttycfg.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
puttygen.rc Grow the Windows Licence dialog. 2019-03-18 20:32:55 +00:00
puttyins.ico `installer.ico' doesn't fit into 8.3, so gets truncated to INSTALLE.ICO in 2007-02-06 22:39:15 +00:00
puttytel.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
puttytel.rc Tweak version string resources for EMBED_CHM. 2019-03-16 12:25:23 +00:00
rcstuff.h Remove Makefile.bor. 2017-09-13 19:26:28 +01:00
README-msi.txt Remove note about .CHM on network drives. 2019-03-18 21:53:45 +00:00
sizetip.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
version.rc2 FIXME about Windows resource CHMfulness hint. 2019-03-18 22:02:13 +00:00
website.url Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
win_res.h Stop looking for putty.chm alongside the binary. 2019-03-16 12:25:23 +00:00
win_res.rc2 Grow the Windows Licence dialog. 2019-03-18 20:32:55 +00:00
wincapi.c Convert a lot of 'int' variables to 'bool'. 2018-11-03 13:45:00 +00:00
wincapi.h Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
wincfg.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
wincons.c Work around console I/O size limit on Windows 7. 2020-02-09 08:51:37 +00:00
winctrls.c Convert a few more universal asserts to unreachable(). 2019-09-09 19:12:02 +01:00
windefs.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
windlg.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
window.c winsftp.c: avoid creating multiple netevents. 2020-02-09 08:19:21 +00:00
wingss.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winhandl.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winhelp.c Remove most traces of WinHelp support. 2019-03-26 00:27:04 +00:00
winhelp.h Remove most traces of WinHelp support. 2019-03-26 00:27:04 +00:00
winhelp.rc2 Tweak version string resources for EMBED_CHM. 2019-03-16 12:25:23 +00:00
winhsock.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winjump.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winmisc.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winmiscs.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winnet.c winnet: use SO_EXCLUSIVEADDRUSE for listening sockets. 2019-09-19 18:12:22 +01:00
winnohlp.c Stop looking for putty.chm alongside the binary. 2019-03-16 12:25:23 +00:00
winnoise.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winnojmp.c Fix up svn:eol-style and svn:keywords on new files. 2010-12-27 00:24:48 +00:00
winnpc.c Move all extern declarations into header files. 2018-11-03 13:47:29 +00:00
winnps.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winpgen.c PuTTYgen: permit and prefer 255 as bit count for ed25519. 2020-02-09 08:51:37 +00:00
winpgnt.c New functions to shrink a strbuf. 2020-02-09 08:51:37 +00:00
winpgntc.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winplink.c winsftp.c: avoid creating multiple netevents. 2020-02-09 08:19:21 +00:00
winprint.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winproxy.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winsecur.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winsecur.h Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winser.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winsftp.c winsftp.c: avoid creating multiple netevents. 2020-02-09 08:19:21 +00:00
winshare.c Access all hashes and MACs through the standard API. 2019-01-20 17:09:24 +00:00
winstore.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winstuff.h winsftp.c: avoid creating multiple netevents. 2020-02-09 08:19:21 +00:00
wintime.c wintime: add a precautionary memset to zero. 2017-02-14 23:25:25 +00:00
winucs.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winutils.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winx11.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00