blob: 9690d879b6d4c5bfc24e50e0e3bca80cb1e6e114 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 77fe5635037ebaf411cae46cf5045ca819b5c145 Mon Sep 17 00:00:00 2001
2From: Zdenek Styblik <stybla@turnovfree.net>
3Date: Sun, 15 Jan 2017 15:11:25 +0100
4Subject: [PATCH 2/4] ID:461 - Make compiler happier about changes related to
5 OpenSSL 1.1
6
7Complaint was that ctx isn't initialized.
8---
9 src/plugins/lanplus/lanplus_crypt_impl.c | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12--- a/src/plugins/lanplus/lanplus_crypt_impl.c
13+++ b/src/plugins/lanplus/lanplus_crypt_impl.c
14@@ -164,7 +164,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_
15 uint8_t * output,
16 uint32_t * bytes_written)
17 {
18- EVP_CIPHER_CTX* ctx;
19+ EVP_CIPHER_CTX *ctx = NULL;
20 EVP_CIPHER_CTX_init(ctx);
21 EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
22 EVP_CIPHER_CTX_set_padding(ctx, 0);
23@@ -239,7 +239,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_
24 uint8_t * output,
25 uint32_t * bytes_written)
26 {
27- EVP_CIPHER_CTX* ctx;
28+ EVP_CIPHER_CTX *ctx = NULL;
29 EVP_CIPHER_CTX_init(ctx);
30 EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
31 EVP_CIPHER_CTX_set_padding(ctx, 0);