0003-ID-461-Make-compiler-happier-about-changes-related-t.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From ccc85e4fd67423e770901ec59975e84b07eed883 Mon Sep 17 00:00:00 2001
  2. From: Zdenek Styblik <stybla@turnovfree.net>
  3. Date: Sun, 15 Jan 2017 15:11:25 +0100
  4. Subject: [PATCH] ID:461 - Make compiler happier about changes related to
  5. OpenSSL 1.1
  6. Complaint was that ctx isn't initialized.
  7. Upstream: https://github.com/ipmitool/ipmitool/commit/77fe5635037ebaf411cae46cf5045ca819b5c145
  8. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
  9. ---
  10. src/plugins/lanplus/lanplus_crypt_impl.c | 4 ++--
  11. 1 file changed, 2 insertions(+), 2 deletions(-)
  12. diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c
  13. index 3c0df23..d12d0e3 100644
  14. --- a/src/plugins/lanplus/lanplus_crypt_impl.c
  15. +++ b/src/plugins/lanplus/lanplus_crypt_impl.c
  16. @@ -164,7 +164,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
  17. uint8_t * output,
  18. uint32_t * bytes_written)
  19. {
  20. - EVP_CIPHER_CTX* ctx;
  21. + EVP_CIPHER_CTX *ctx = NULL;
  22. EVP_CIPHER_CTX_init(ctx);
  23. EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
  24. EVP_CIPHER_CTX_set_padding(ctx, 0);
  25. @@ -239,7 +239,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
  26. uint8_t * output,
  27. uint32_t * bytes_written)
  28. {
  29. - EVP_CIPHER_CTX* ctx;
  30. + EVP_CIPHER_CTX *ctx = NULL;
  31. EVP_CIPHER_CTX_init(ctx);
  32. EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
  33. EVP_CIPHER_CTX_set_padding(ctx, 0);
  34. --
  35. 1.9.1