summaryrefslogtreecommitdiffstats
path: root/libssh/crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/crypt.c')
-rw-r--r--libssh/crypt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libssh/crypt.c b/libssh/crypt.c
index e118f6a7..22e7a3f1 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){