Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nettle
nettle
Commits
0e8df275
Commit
0e8df275
authored
May 16, 2017
by
Nikos Mavrogiannopoulos
Committed by
Niels Möller
May 16, 2017
Browse files
_aes_set_key: ensure with assert() that nk is non-zero
Signed-off-by:
Nikos Mavrogiannopoulos
<
nmav@redhat.com
>
parent
6b94fa83
Changes
1
Hide whitespace changes
Inline
Side-by-side
aes-set-key-internal.c
View file @
0e8df275
...
...
@@ -39,6 +39,7 @@
#endif
#include
"aes-internal.h"
#include
<assert.h>
#include
"macros.h"
void
...
...
@@ -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
++
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment