From 7f91e5ae65a252dcc9e0f6df7d747a8a87af1764 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 7 Jun 2017 23:42:33 +0200 Subject: [PATCH] requiring 'name != NULL' in find_cipher_any() doesn't make sense --- src/misc/crypt/crypt_find_cipher_any.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/misc/crypt/crypt_find_cipher_any.c b/src/misc/crypt/crypt_find_cipher_any.c index 34cd8f0..a25a5b5 100644 --- a/src/misc/crypt/crypt_find_cipher_any.c +++ b/src/misc/crypt/crypt_find_cipher_any.c @@ -26,10 +26,10 @@ int find_cipher_any(const char *name, int blocklen, int keylen) { int x; - LTC_ARGCHK(name != NULL); - - x = find_cipher(name); - if (x != -1) return x; + if(name != NULL) { + x = find_cipher(name); + if (x != -1) return x; + } LTC_MUTEX_LOCK(<c_cipher_mutex); for (x = 0; x < TAB_SIZE; x++) {