encrypted-keys: check hex2bin result
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Tue, 20 Sep 2011 15:23:55 +0000 (11:23 -0400)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 21 Sep 2011 03:26:44 +0000 (23:26 -0400)
commit2b3ff6319e2312656fbefe0209bef02d58b6836a
tree43041b8a5e6fe31dadf2ad682d73fa873476b952
parent2684bf7f29cfb13ef2c60f3b3a53ee47d0db7022
encrypted-keys: check hex2bin result

For each hex2bin call in encrypted keys, check that the ascii hex string
is valid.  On failure, return -EINVAL.

Changelog v1:
- hex2bin now returns an int

Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
security/keys/encrypted-keys/encrypted.c