diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2005-10-26 21:46:48 +0000 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2005-10-26 21:46:48 +0000 |
commit | cddc5d6889f252b2cde5403f16063b640864f55d (patch) | |
tree | 7daa335f71712c3ddbb121b3d090943d0a001c44 /libssh | |
parent | 7b416e5c520c4dea21e242733d64672f304fdbd3 (diff) | |
download | libssh-cddc5d6889f252b2cde5403f16063b640864f55d.tar.gz libssh-cddc5d6889f252b2cde5403f16063b640864f55d.tar.xz libssh-cddc5d6889f252b2cde5403f16063b640864f55d.zip |
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
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/crypt.c | 8 |
1 files changed, 4 insertions, 4 deletions
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){ |