[Ttssh2-commit] [7889] SSH1: 接続先のポート番号が22以外で、新規にknown_hostsファイルへホスト鍵を

scmno****@osdn***** scmno****@osdn*****
2019年 7月 25日 (木) 19:36:55 JST


Revision: 7889
          https://osdn.net/projects/ttssh2/scm/svn/commits/7889
Author:   yutakapon
Date:     2019-07-25 19:36:55 +0900 (Thu, 25 Jul 2019)
Log Message:
-----------
SSH1: 接続先のポート番号が22以外で、新規にknown_hostsファイルへホスト鍵を
書き込む時、アプリが落ちることがある問題を修正した。

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/ttssh2/ttxssh/hosts.c

Property Changed:
----------------
    trunk/

-------------- next part --------------
Index: trunk
===================================================================
--- trunk	2019-07-25 10:15:35 UTC (rev 7888)
+++ trunk	2019-07-25 10:36:55 UTC (rev 7889)

Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,5 ##
 /branches/drag_and_drop:7130,7139,7141,7143-7147
+/branches/openssl_1_1_1_v2:7888
 /branches/portfwd_memleak:7732,7736-7737,7764
 /branches/ssh_ed25519:5495-5544
 /branches/vs2015_warn:6194-6285
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2019-07-25 10:15:35 UTC (rev 7888)
+++ trunk/doc/en/html/about/history.html	2019-07-25 10:36:55 UTC (rev 7889)
@@ -3163,7 +3163,8 @@
 
   <li>Bug fixes
     <ul>
-      <li>When SSH communication is slow by using port forwarding, an application fault is occurred due to increase memory consumption.</li>
+      <li>SSH2: When SSH communication is slow by using port forwarding, an application fault is occurred due to increase memory consumption.</li>
+      <li>SSH1: When the destination port number is other than 22, an application fault may be occurred after the host key is newly written to known_hosts file.</li>
     </ul>
   </li>
 

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2019-07-25 10:15:35 UTC (rev 7888)
+++ trunk/doc/ja/html/about/history.html	2019-07-25 10:36:55 UTC (rev 7889)
@@ -3169,7 +3169,8 @@
 
   <li>\x83o\x83O\x8FC\x90\xB3
     <ul>
-      <li>\x83|\x81[\x83g\x93]\x91\x97\x82\xC5SSH\x92ʐM\x82\xAA\x92x\x82\xA2\x8Fꍇ\x82ɂ\xA8\x82\xA2\x82āA\x8F\xC1\x94\x83\x82\x83\x8A\x82\xAA\x94\xEC\x91剻\x82\xB5\x82ăA\x83v\x83\x8A\x82\xAA\x97\x8E\x82\xBF\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>SSH2: \x83|\x81[\x83g\x93]\x91\x97\x82\xC5SSH\x92ʐM\x82\xAA\x92x\x82\xA2\x8Fꍇ\x82ɂ\xA8\x82\xA2\x82āA\x8F\xC1\x94\x83\x82\x83\x8A\x82\xAA\x94\xEC\x91剻\x82\xB5\x82ăA\x83v\x83\x8A\x82\xAA\x97\x8E\x82\xBF\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>SSH1: \x90ڑ\xB1\x90\xE6\x82̃|\x81[\x83g\x94ԍ\x86\x82\xAA22\x88ȊO\x82ŁA\x90V\x8BK\x82\xC9known_hosts\x83t\x83@\x83C\x83\x8B\x82փz\x83X\x83g\x8C\xAE\x82\xF0\x8F\x91\x82\xAB\x8D\x9E\x82ގ\x9E\x81A\x83A\x83v\x83\x8A\x82\xAA\x97\x8E\x82\xBF\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 

Modified: trunk/ttssh2/ttxssh/hosts.c
===================================================================
--- trunk/ttssh2/ttxssh/hosts.c	2019-07-25 10:15:35 UTC (rev 7888)
+++ trunk/ttssh2/ttxssh/hosts.c	2019-07-25 10:36:55 UTC (rev 7889)
@@ -1048,7 +1048,13 @@
 			index = strlen(result);
 		}
 
-		_snprintf_s(result + index, result_len - host_len, _TRUNCATE,
+		// \x91\xE62\x88\xF8\x90\x94(sizeOfBuffer)\x82̎w\x92\xE8\x8C\xEB\x82\xE8\x82ɂ\xE6\x82\xE8\x81A\x8E\xC0\x8Dۂ̃o\x83b\x83t\x83@\x83T\x83C\x83Y\x82\xE6\x82\xE8
+		// \x91傫\x82\xAD\x82Ȃ\xC1\x82Ă\xA2\x82\xBD\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B
+		// \x83|\x81[\x83g\x94ԍ\x86\x82\xAA22\x88ȊO\x82̏ꍇ\x81AVS2005\x82\xCCdebug build\x82ł́Aadd_host_key()\x82\xCC
+		// free(keydata)\x82ŁA\x82\xA9\x82Ȃ炸\x81u\x83u\x83\x8C\x81[\x83N\x83|\x83C\x83\x93\x83g\x82\xAA\x94\xAD\x90\xB6\x82\xB5\x82܂\xB5\x82\xBD\x81B\x83q\x81[\x83v\x82\xAA\x89\xF3\x82\xEA\x82Ă\xA2\x82邱\x82Ƃ\xAA
+		// \x8C\xB4\x88\xF6\x82Ƃ\xB5\x82čl\x82\xA6\x82\xE7\x82\xEA\x82܂\xB7\x81B\x81v\x82Ƃ\xA2\x82\xA4\x97\xE1\x8AO\x82\xAA\x94\xAD\x90\xB6\x82\xB7\x82\xE9\x81B
+		// release build\x82ł͍Č\xBB\x90\xAB\x82\xAA\x92Ⴂ\x81B
+		_snprintf_s(result + index, result_len - index, _TRUNCATE,
 		            " %d ", pvar->hosts_state.hostkey.bits);
 		index += strlen(result + index);
 		index += print_mp_int(result + index, pvar->hosts_state.hostkey.exp);


Ttssh2-commit メーリングリストの案内