[Ttssh2-commit] [7868] size_tとintのサイズが異なっている場合でも動作するよう修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 7月 21日 (日) 00:18:26 JST


Revision: 7868
          https://osdn.net/projects/ttssh2/scm/svn/commits/7868
Author:   zmatsuo
Date:     2019-07-21 00:18:26 +0900 (Sun, 21 Jul 2019)
Log Message:
-----------
size_tとintのサイズが異なっている場合でも動作するよう修正

Modified Paths:
--------------
    branches/x64/ttssh2/ttxssh/key.c

-------------- next part --------------
Modified: branches/x64/ttssh2/ttxssh/key.c
===================================================================
--- branches/x64/ttssh2/ttxssh/key.c	2019-07-20 15:18:17 UTC (rev 7867)
+++ branches/x64/ttssh2/ttxssh/key.c	2019-07-20 15:18:26 UTC (rev 7868)
@@ -2329,6 +2329,7 @@
 	buffer_t *bsig = NULL;
 	char *cp, *sig;
 	size_t i, ndone, siglen;
+	int siglen_i;
 	int ret;
 
 	// SSH2 packet format:
@@ -2384,7 +2385,8 @@
 		free(blob);
 		blob = NULL;
 
-		sig = buffer_get_string_msg(bsig, &siglen);
+		sig = buffer_get_string_msg(bsig, &siglen_i);
+		siglen = siglen_i;
 		// Verify signature
 		ret = key_verify(ctx->keys[i], sig, siglen, buffer_ptr(b), buffer_len(b));
 		free(sig);


Ttssh2-commit メーリングリストの案内
Back to archive index