X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=crypt.c;h=69e4a3140a1599f971dbd641dd99e3461af40ff1;hp=207ad5db4e9f264091076d404adb06e12b95e8e4;hb=2fa3262b24c1e64191d8acfc3c4a96f2ef13c433;hpb=6f24630aa6d5ea343f0f0626b356d03fa36f890e diff --git a/crypt.c b/crypt.c index 207ad5db..69e4a314 100644 --- a/crypt.c +++ b/crypt.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2011 Andre Noll + * Copyright (C) 2005-2012 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -7,7 +7,6 @@ /** \file crypt.c Openssl-based encryption/decryption routines. */ #include -#include #include #include #include @@ -307,7 +306,7 @@ int sc_send_bin_buffer(struct stream_cipher_context *scc, char *buf, int sc_recv_bin_buffer(struct stream_cipher_context *scc, char *buf, size_t size) { - unsigned char *tmp = para_malloc(size); + unsigned char *tmp = para_malloc(ROUND_UP(size, RC4_ALIGN)); ssize_t ret = recv(scc->fd, tmp, size, 0); if (ret > 0)