summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bio
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-21 13:13:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-21 13:13:44 +0000
commit9315c702efc9af8ede69326e0a967e883dd921db (patch)
tree2a36f036f95036e483d59980196b499aea41b21d /lib/libcrypto/bio
parent0ed14b3c443be6a23fb3b3986e843e41490fa2b4 (diff)
wrong calloc, see people do care
Diffstat (limited to 'lib/libcrypto/bio')
-rw-r--r--lib/libcrypto/bio/bss_dgram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/bio/bss_dgram.c b/lib/libcrypto/bio/bss_dgram.c
index 72cb19d135f..a3b5bb65746 100644
--- a/lib/libcrypto/bio/bss_dgram.c
+++ b/lib/libcrypto/bio/bss_dgram.c
@@ -1118,7 +1118,8 @@ dgram_sctp_write(BIO *b, const char *in, int inl)
if (data->save_shutdown && !BIO_dgram_sctp_wait_for_dry(b)) {
data->saved_message.bio = b;
data->saved_message.length = inl;
- data->saved_message.data = calloc(1, inl);
+ data->saved_message.data = malloc(inl);
+ memcpy(data->saved_message.data, in, inl);
return inl;
}