]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - crypt.c
Fix UNIX_PATH_MAX on NetBSD.
[paraslash.git] / crypt.c
diff --git a/crypt.c b/crypt.c
index 5b7029d32d1aa906b8d5dae49a0e965af9d1c87f..7b7c16d348952dab0dccbbd2170af178a703adb3 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -306,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)