simon-svn: putty: simon

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sun Sep 7 14:06:51 BST 2014


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     simon
Revision:       10215
Date:           2014-09-07 14:06:50 +0100 (Sun, 07 Sep 2014)

Log message (13 lines):
Cope with REG_SZ data not having a trailing NUL.

A user points out that the person who writes a REG_SZ into the
registry can choose whether or not to NUL-terminate it properly, and
if they don't, RegQueryValueEx will retrieve it without the NUL. So if
someone does that to PuTTY's saved session data, then PuTTY may
retrieve nonsense strings.

Arguably this is the fault of whoever tampered with the saved session
data without doing it the same way we would have, but even so, there
ought to be some handling at our end other than silently returning the
wrong data, and putting the NUL back on seems more sensible than
complaining loudly.

Modified files:
U   putty/windows/winstore.c

Links:
http://svn.tartarus.org/sgt/?rev=10215&view=rev
http://svn.tartarus.org/sgt/putty/windows/winstore.c?rev=10215&r1=10214&r2=10215



More information about the tartarus-commits mailing list