]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commit
Fix a potential crash in ssh_setup_portfwd.
authorSimon Tatham <anakin@pobox.com>
Sat, 25 Jan 2014 15:59:04 +0000 (15:59 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 25 Jan 2014 15:59:04 +0000 (15:59 +0000)
commitb5924f739aab0783165269f342295495e6aa1cd8
tree032f2ffa0dfc8197515c36b16353cc3a8dac190f
parent5780b1ed2bf650ca3a271e0d1ce4c96f719a1f12
Fix a potential crash in ssh_setup_portfwd.

If we search for a colon by computing ptr + host_strcspn(ptr,":"),
then the resulting pointer is always non-NULL, and the 'not found'
condition is not !p but !*p.

This typo could have caused PuTTY to overrun a string, but not in a
security-bug sense because any such string would have to have been
loaded from the configuration rather than received from a hostile
source.

git-svn-id: http://svn.tartarus.org/sgt/putty@10123 cda61777-01e9-0310-a592-d414129be87e
ssh.c