summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelconas <reg@elconas.de>2016-06-10 10:33:50 +0200
committerelconas <reg@elconas.de>2016-06-10 10:33:50 +0200
commit36b14231b1fb2e4f264168d96186fa2b9ce4cfdb (patch)
tree6056cc8d7a284a600b236bb6ca9e49a12a3319ed
parente20060d8e0ae20c1ca1592a3477c268069ff3582 (diff)
downloadnet-ssh-36b14231b1fb2e4f264168d96186fa2b9ce4cfdb.tar.gz
Fix https://github.com/net-ssh/net-ssh/issues/235
-rw-r--r--lib/net/ssh/authentication/pageant.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/ssh/authentication/pageant.rb b/lib/net/ssh/authentication/pageant.rb
index f0bf758..8a5bca2 100644
--- a/lib/net/ssh/authentication/pageant.rb
+++ b/lib/net/ssh/authentication/pageant.rb
@@ -254,7 +254,7 @@ module Net; module SSH; module Authentication
Win.GetTokenInformation(token_handle,
token_information_class,
Win::NULL, 0, preturn_length)
- ptoken_information = malloc_ptr(preturn_length.ptr.to_i)
+ ptoken_information = malloc_ptr(preturn_length.to_s(Win::SIZEOF_DWORD).unpack('L')[0])
# This call is going to write the requested information to
# the memory location referenced by token_information.