Signed-off-by: Steffan Karger <stef...@karger.me>
---
 src/openvpn/crypto_openssl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c
index 5f28391..9139480 100644
--- a/src/openvpn/crypto_openssl.c
+++ b/src/openvpn/crypto_openssl.c
@@ -292,8 +292,7 @@ show_available_ciphers()
     size_t i;
 
     /* If we ever exceed this, we must be more selective */
-    const size_t cipher_list_len = 1000;
-    const EVP_CIPHER *cipher_list[cipher_list_len];
+    const EVP_CIPHER *cipher_list[1000];
     size_t num_ciphers = 0;
 #ifndef ENABLE_SMALL
     printf("The following ciphers and cipher modes are available for use\n"
@@ -318,7 +317,7 @@ show_available_ciphers()
         {
             cipher_list[num_ciphers++] = cipher;
         }
-        if (num_ciphers == cipher_list_len)
+        if (num_ciphers == (sizeof(cipher_list)/sizeof(*cipher_list)))
         {
             msg(M_WARN, "WARNING: Too many ciphers, not showing all");
             break;
-- 
2.7.4


------------------------------------------------------------------------------
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