Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nick Mathewson
Tor
Commits
7f042cbc
Commit
7f042cbc
authored
Nov 13, 2018
by
Nick Mathewson
🐛
Browse files
Merge branch 'bug28413_029' into maint-0.2.9
parents
46796623
1a11702a
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug28413
0 → 100644
View file @
7f042cbc
o Minor bugfixes (compilation):
- Initialize a variable in aes_new_cipher(), since some compilers
cannot tell that we always initialize it before use. Fixes bug 28413;
bugfix on 0.2.9.3-alpha.
src/common/aes.c
View file @
7f042cbc
...
...
@@ -99,12 +99,12 @@ aes_cnt_cipher_t *
aes_new_cipher
(
const
uint8_t
*
key
,
const
uint8_t
*
iv
,
int
key_bits
)
{
EVP_CIPHER_CTX
*
cipher
=
EVP_CIPHER_CTX_new
();
const
EVP_CIPHER
*
c
;
const
EVP_CIPHER
*
c
=
NULL
;
switch
(
key_bits
)
{
case
128
:
c
=
EVP_aes_128_ctr
();
break
;
case
192
:
c
=
EVP_aes_192_ctr
();
break
;
case
256
:
c
=
EVP_aes_256_ctr
();
break
;
default:
tor_assert
(
0
);
// LCOV_EXCL_LINE
default:
tor_assert
_unreached
();
// LCOV_EXCL_LINE
}
EVP_EncryptInit
(
cipher
,
c
,
key
,
iv
);
return
(
aes_cnt_cipher_t
*
)
cipher
;
...
...
@@ -402,4 +402,3 @@ aes_set_iv(aes_cnt_cipher_t *cipher, const uint8_t *iv)
}
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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