0003-openssl-fix-dereferencing-ambiguity-potentially-caus.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 28fe5e4de437f8fce6e428b7db9bc8640cda4c61 Mon Sep 17 00:00:00 2001
  2. From: Giulio Benetti <giulio.benetti@micronovasrl.com>
  3. Date: Thu, 13 Sep 2018 09:51:35 +0200
  4. Subject: [PATCH] openssl: fix dereferencing ambiguity potentially causing
  5. build failure
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. When dereferencing from *aes_ctr_cipher, being a pointer itself,
  10. ambiguity can occur with compiler and build can fail reporting:
  11. openssl.c:574:20: error: ‘*aes_ctr_cipher’ is a pointer; did you mean to use ‘->’?
  12. *aes_ctr_cipher->nid = type;
  13. Sorround every *aes_ctr_cipher-> occurence with paranthesis like this
  14. (*aes_ctr_cipher)->
  15. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
  16. Upstream: https://github.com/libssh2/libssh2/commit/b5b6673c2823a18753a14571a6c01bde33fa3a8b
  17. ---
  18. src/openssl.c | 14 +++++++-------
  19. 1 file changed, 7 insertions(+), 7 deletions(-)
  20. diff --git a/src/openssl.c b/src/openssl.c
  21. index 678d5de..c26aaec 100644
  22. --- a/src/openssl.c
  23. +++ b/src/openssl.c
  24. @@ -571,13 +571,13 @@ make_ctr_evp (size_t keylen, EVP_CIPHER **aes_ctr_cipher, int type)
  25. EVP_CIPHER_meth_set_cleanup(*aes_ctr_cipher, aes_ctr_cleanup);
  26. }
  27. #else
  28. - *aes_ctr_cipher->nid = type;
  29. - *aes_ctr_cipher->block_size = 16;
  30. - *aes_ctr_cipher->key_len = keylen;
  31. - *aes_ctr_cipher->iv_len = 16;
  32. - *aes_ctr_cipher->init = aes_ctr_init;
  33. - *aes_ctr_cipher->do_cipher = aes_ctr_do_cipher;
  34. - *aes_ctr_cipher->cleanup = aes_ctr_cleanup;
  35. + (*aes_ctr_cipher)->nid = type;
  36. + (*aes_ctr_cipher)->block_size = 16;
  37. + (*aes_ctr_cipher)->key_len = keylen;
  38. + (*aes_ctr_cipher)->iv_len = 16;
  39. + (*aes_ctr_cipher)->init = aes_ctr_init;
  40. + (*aes_ctr_cipher)->do_cipher = aes_ctr_do_cipher;
  41. + (*aes_ctr_cipher)->cleanup = aes_ctr_cleanup;
  42. #endif
  43. return *aes_ctr_cipher;
  44. --
  45. 2.17.1