diff options
Diffstat (limited to 'sys/opencrypto/xform.c')
-rw-r--r-- | sys/opencrypto/xform.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/opencrypto/xform.c b/sys/opencrypto/xform.c index 5dfb317..a24d6da 100644 --- a/sys/opencrypto/xform.c +++ b/sys/opencrypto/xform.c @@ -512,6 +512,8 @@ rijndael128_setkey(u_int8_t **sched, u_int8_t *key, int len) { int err; + if (len != 16 && len != 24 && len != 32) + return (EINVAL); MALLOC(*sched, u_int8_t *, sizeof(rijndael_ctx), M_CRYPTO_DATA, M_NOWAIT|M_ZERO); if (*sched != NULL) { |