summaryrefslogtreecommitdiffstats
path: root/lib/crypto
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-11 20:26:40 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-11 20:26:40 +0200
commita85f6634853a4cf825d70e07a789e96e1882f376 (patch)
tree7f2c157d7b8fed6e47813f91762352d88261fcf0 /lib/crypto
parent033bc4682b7c7541966da4b2b43b65a4ba722b43 (diff)
downloadsamba-a85f6634853a4cf825d70e07a789e96e1882f376.tar.gz
samba-a85f6634853a4cf825d70e07a789e96e1882f376.tar.xz
samba-a85f6634853a4cf825d70e07a789e96e1882f376.zip
Make sure to allocate copy for arc4 data, to avoid problems freeing
later.
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/arcfour.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/arcfour.c b/lib/crypto/arcfour.c
index b4773f40414..e70713b7e6a 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);