Browse Source

2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Fixed offset calculation.
	* src/LibgcryptDHKeyExchange.h (computeSecret)
Tatsuhiro Tsujikawa 17 years ago
parent
commit
1d32c516d9
2 changed files with 6 additions and 1 deletions
  1. 5 0
      ChangeLog
  2. 1 1
      src/LibgcryptDHKeyExchange.h

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-02-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Fixed offset calculation.
+	* src/LibgcryptDHKeyExchange.h (computeSecret)
+
 2008-02-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Rewritten itos and uitos using template. llitos and ullitos are

+ 1 - 1
src/LibgcryptDHKeyExchange.h

@@ -151,7 +151,7 @@ public:
     gcry_mpi_release(peerPublicKey);
 
     memset(out, 0, outLength);
-    size_t secretBytes = (gcry_mpi_get_nbits(secret)+7/8);
+    size_t secretBytes = (gcry_mpi_get_nbits(secret)+7)/8;
     size_t offset = _keyLength-secretBytes;
     size_t nwritten;
     {