]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - crypt.c
Merge remote-tracking branch 's/master'
[paraslash.git] / crypt.c
diff --git a/crypt.c b/crypt.c
index 207ad5db4e9f264091076d404adb06e12b95e8e4..4762fddcf018b27ee365931c22151c2216a29e86 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -7,7 +7,6 @@
 /** \file crypt.c Openssl-based encryption/decryption routines. */
 
 #include <regex.h>
-#include <stdbool.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <openssl/rand.h>
@@ -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)