From a85f6634853a4cf825d70e07a789e96e1882f376 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 11 Oct 2008 20:26:40 +0200 Subject: Make sure to allocate copy for arc4 data, to avoid problems freeing later. --- lib/crypto/arcfour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/arcfour.c b/lib/crypto/arcfour.c index b4773f4041..e70713b7e6 100644 --- a/lib/crypto/arcfour.c +++ b/lib/crypto/arcfour.c @@ -81,7 +81,7 @@ _PUBLIC_ void arcfour_crypt_blob(uint8_t *data, int len, const DATA_BLOB *key) */ _PUBLIC_ void arcfour_crypt(uint8_t *data, const uint8_t keystr[16], int len) { - DATA_BLOB key = { discard_const_p(uint8_t, keystr), 16 }; + DATA_BLOB key = data_blob_named(keystr, 16, "DATA_BLOB: "__location__); arcfour_crypt_blob(data, len, &key); -- cgit