projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb61cd5
)
RC4: Allocate 8 extra bytes for send buffer.
author
Andre Noll
<maan@systemlinux.org>
Tue, 11 May 2010 07:00:29 +0000
(09:00 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Tue, 11 May 2010 07:00:29 +0000
(09:00 +0200)
valgrind on Mac OS complains. Apparently openssl writes some bytes
more than the length of the output buffer.
crypt.c
patch
|
blob
|
history
diff --git
a/crypt.c
b/crypt.c
index b977a07aac1b785735238cc6e3e8e419f4fabf4a..b6a54604f167babf9c05712658233d713c229be0 100644
(file)
--- a/
crypt.c
+++ b/
crypt.c
@@
-220,7
+220,7
@@
int rc4_send_bin_buffer(struct rc4_context *rc4c, const char *buf, size_t len)
unsigned char *tmp;
assert(len);
- tmp = para_malloc(len);
+ tmp = para_malloc(len
+ 8
);
RC4(&rc4c->send_key, len, (const unsigned char *)buf, tmp);
ret = write_all(rc4c->fd, (char *)tmp, &len);
free(tmp);