Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1489655537-19164-1-git-send-email-steffan@karger.me>
URL: http://www.mail-archive.com/search?l=mid&q=1489655537-19164-1-git-send-email-steffan@karger.me
Signed-off-by: Gert Doering <gert@greenie.muc.de>
... | ... |
@@ -286,8 +286,7 @@ show_available_ciphers() |
286 | 286 |
size_t i; |
287 | 287 |
|
288 | 288 |
/* If we ever exceed this, we must be more selective */ |
289 |
- const size_t cipher_list_len = 1000; |
|
290 |
- const EVP_CIPHER *cipher_list[cipher_list_len]; |
|
289 |
+ const EVP_CIPHER *cipher_list[1000]; |
|
291 | 290 |
size_t num_ciphers = 0; |
292 | 291 |
#ifndef ENABLE_SMALL |
293 | 292 |
printf("The following ciphers and cipher modes are available for use\n" |
... | ... |
@@ -312,7 +311,7 @@ show_available_ciphers() |
312 | 312 |
{ |
313 | 313 |
cipher_list[num_ciphers++] = cipher; |
314 | 314 |
} |
315 |
- if (num_ciphers == cipher_list_len) |
|
315 |
+ if (num_ciphers == (sizeof(cipher_list)/sizeof(*cipher_list))) |
|
316 | 316 |
{ |
317 | 317 |
msg(M_WARN, "WARNING: Too many ciphers, not showing all"); |
318 | 318 |
break; |