Skip to content

Commit

Permalink
EVP_CIPHER_block_size returns size_t, which is unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
wferi committed Jan 21, 2018
1 parent fc3c501 commit f2e1f20
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libknet/crypto_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,9 @@ static int opensslcrypto_init(
}

if (opensslcrypto_instance->crypto_cipher_type) {
int block_size;
size_t block_size;

block_size = EVP_CIPHER_block_size(opensslcrypto_instance->crypto_cipher_type);
if (block_size < 0) {
goto out_err;
}

knet_h->sec_header_size += (block_size * 2);
knet_h->sec_header_size += SALT_SIZE;
Expand Down

0 comments on commit f2e1f20

Please sign in to comment.