summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiulio Benetti <giulio.benetti@micronovasrl.com>2018-09-13 08:08:54 (GMT)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-09-16 14:11:21 (GMT)
commit4a7da55eb3d5236e3559f5492fa2c03bfb95084f (patch)
tree43581423d4f5df8991a6eb964055bcb643374906
parent1fc2b4395977059e418e0532ab093008de9f1bb4 (diff)
downloadbuildroot-4a7da55eb3d5236e3559f5492fa2c03bfb95084f.tar.gz
buildroot-4a7da55eb3d5236e3559f5492fa2c03bfb95084f.tar.bz2
libssh2: fix build failure due to pointer dereferencing ambiguity
When dereferencing from *aes_ctr_cipher, being a pointer itself, ambiguity can occur with compiler and build can fail reporting: openssl.c:574:20: error: ‘*aes_ctr_cipher’ is a pointer; did you mean to use ‘->’? *aes_ctr_cipher->nid = type; Add a patch to sorround every *aes_ctr_cipher-> occurence with paranthesis like this (*aes_ctr_cipher)-> Fixes: http://autobuild.buildroot.net/results/97c/97c43dd2122f55f3166683aa1b29ce1ca54bcb9c/ http://autobuild.buildroot.net/results/4b7/4b728d275f1399e3cb72d40482076ee54b35852a/ Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/libssh2/0003-openssl-fix-dereferencing-ambiguity-potentially-caus.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/package/libssh2/0003-openssl-fix-dereferencing-ambiguity-potentially-caus.patch b/package/libssh2/0003-openssl-fix-dereferencing-ambiguity-potentially-caus.patch
new file mode 100644
index 0000000..44eed2b
--- /dev/null
+++ b/package/libssh2/0003-openssl-fix-dereferencing-ambiguity-potentially-caus.patch
@@ -0,0 +1,51 @@
+From 28fe5e4de437f8fce6e428b7db9bc8640cda4c61 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@micronovasrl.com>
+Date: Thu, 13 Sep 2018 09:51:35 +0200
+Subject: [PATCH] openssl: fix dereferencing ambiguity potentially causing
+ build failure
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When dereferencing from *aes_ctr_cipher, being a pointer itself,
+ambiguity can occur with compiler and build can fail reporting:
+openssl.c:574:20: error: ‘*aes_ctr_cipher’ is a pointer; did you mean to use ‘->’?
+ *aes_ctr_cipher->nid = type;
+
+Sorround every *aes_ctr_cipher-> occurence with paranthesis like this
+(*aes_ctr_cipher)->
+
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
+Upstream: https://github.com/libssh2/libssh2/commit/b5b6673c2823a18753a14571a6c01bde33fa3a8b
+---
+ src/openssl.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/openssl.c b/src/openssl.c
+index 678d5de..c26aaec 100644
+--- a/src/openssl.c
++++ b/src/openssl.c
+@@ -571,13 +571,13 @@ make_ctr_evp (size_t keylen, EVP_CIPHER **aes_ctr_cipher, int type)
+ EVP_CIPHER_meth_set_cleanup(*aes_ctr_cipher, aes_ctr_cleanup);
+ }
+ #else
+- *aes_ctr_cipher->nid = type;
+- *aes_ctr_cipher->block_size = 16;
+- *aes_ctr_cipher->key_len = keylen;
+- *aes_ctr_cipher->iv_len = 16;
+- *aes_ctr_cipher->init = aes_ctr_init;
+- *aes_ctr_cipher->do_cipher = aes_ctr_do_cipher;
+- *aes_ctr_cipher->cleanup = aes_ctr_cleanup;
++ (*aes_ctr_cipher)->nid = type;
++ (*aes_ctr_cipher)->block_size = 16;
++ (*aes_ctr_cipher)->key_len = keylen;
++ (*aes_ctr_cipher)->iv_len = 16;
++ (*aes_ctr_cipher)->init = aes_ctr_init;
++ (*aes_ctr_cipher)->do_cipher = aes_ctr_do_cipher;
++ (*aes_ctr_cipher)->cleanup = aes_ctr_cleanup;
+ #endif
+
+ return *aes_ctr_cipher;
+--
+2.17.1
+