This fixes a regression in commit 8e95e20913:
on amd64, an implicit declaration of ERR_error_string leads to segfaults
if the returned pointer does not fit in an 'int'.

Trac: #792

Signed-off-by: Julien Muchembled <j...@nexedi.com>
---
This patch is for the 2.3 branch. In the master branch,
crypto_openssl.c already includes these files.

 src/openvpn/crypto_openssl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c
index 7b1ac6c..fe22044 100644
--- a/src/openvpn/crypto_openssl.c
+++ b/src/openvpn/crypto_openssl.c
@@ -45,6 +45,8 @@
 #include <openssl/objects.h>
 #include <openssl/evp.h>
 #include <openssl/des.h>
+#include <openssl/err.h>
+#include <openssl/rand.h>
 
 /*
  * Check for key size creepage.
-- 
2.10.2.2.g19ca937.dirty


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to