summaryrefslogtreecommitdiffstats
path: root/cryptodev_cipher.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-07 08:31:14 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-07 08:31:14 +0200
commit58a20b797e5a987fc8f7c5bea3be24d754908bf5 (patch)
tree8f3d54711c4685da083826b3422f0d9dd46ae452 /cryptodev_cipher.c
parentd12ecf68276ab0e57ea578d763f23b2143e57ed8 (diff)
downloadcryptodev-linux-58a20b797e5a987fc8f7c5bea3be24d754908bf5.tar.gz
cryptodev-linux-58a20b797e5a987fc8f7c5bea3be24d754908bf5.tar.xz
cryptodev-linux-58a20b797e5a987fc8f7c5bea3be24d754908bf5.zip
set_iv() function accepts argument from kernel memory.
Diffstat (limited to 'cryptodev_cipher.c')
-rw-r--r--cryptodev_cipher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptodev_cipher.c b/cryptodev_cipher.c
index bbd79d9..0dd2f10 100644
--- a/cryptodev_cipher.c
+++ b/cryptodev_cipher.c
@@ -127,9 +127,9 @@ void cryptodev_cipher_deinit(struct cipher_data* cdata)
cdata->init = 0;
}
-int cryptodev_cipher_set_iv(struct cipher_data* cdata, void __user* iv, size_t iv_size)
+void cryptodev_cipher_set_iv(struct cipher_data* cdata, void __user* iv, size_t iv_size)
{
- return copy_from_user(cdata->async.iv, iv, min(iv_size,sizeof(cdata->async.iv)));
+ memcpy(cdata->async.iv, iv, min(iv_size,sizeof(cdata->async.iv)));
}
static inline int waitfor (struct cryptodev_result* cr, ssize_t ret)