Commit 0e8df275 authored by Nikos Mavrogiannopoulos's avatar Nikos Mavrogiannopoulos Committed by Niels Möller
Browse files

_aes_set_key: ensure with assert() that nk is non-zero

Signed-off-by: default avatarNikos Mavrogiannopoulos <>
parent 6b94fa83
......@@ -39,6 +39,7 @@
#include "aes-internal.h"
#include <assert.h>
#include "macros.h"
......@@ -52,6 +53,7 @@ _aes_set_key(unsigned nr, unsigned nk,
unsigned lastkey, i;
uint32_t t;
assert(nk != 0);
lastkey = (AES_BLOCK_SIZE/4) * (nr + 1);
for (i=0, rp = rcon; i<nk; i++)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment