From cddc5d6889f252b2cde5403f16063b640864f55d Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 26 Oct 2005 21:46:48 +0000 Subject: norbert's Makefile.in and crypt.c patches git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@48 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/crypt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libssh') diff --git a/libssh/crypt.c b/libssh/crypt.c index e118f6a..22e7a3f 100644 --- a/libssh/crypt.c +++ b/libssh/crypt.c @@ -36,12 +36,12 @@ MA 02111-1307, USA. */ #include "libssh/crypto.h" u32 packet_decrypt_len(SSH_SESSION *session, char *crypted){ - u32 *decrypted; + u32 decrypted; if(session->current_crypto) packet_decrypt(session,crypted,session->current_crypto->in_cipher->blocksize); - decrypted=(u32 *)crypted; - ssh_say(3,"size decrypted : %lx\n",ntohl(*decrypted)); - return ntohl(*decrypted); + memcpy(&decrypted,crypted,sizeof(decrypted)); + ssh_say(3,"size decrypted : %lx\n",ntohl(decrypted)); + return ntohl(decrypted); } int packet_decrypt(SSH_SESSION *session, void *data,u32 len){ -- cgit