diff libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents 6dba84798cd5
children
line wrap: on
line diff
--- a/libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c	Tue Jan 23 23:27:40 2018 +0800
+++ b/libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c	Sat Feb 17 19:29:51 2018 +0800
@@ -5,8 +5,6 @@
  *
  * The library is free for all purposes without any express
  * guarantee it works.
- *
- * Tom St Denis, [email protected], http://libtom.org
  */
 #include "tomcrypt.h"
 
@@ -16,7 +14,7 @@
 */
 
 /**
-   Find a cipher flexibly.  First by name then if not present by block and key size 
+   Find a cipher flexibly.  First by name then if not present by block and key size
    @param name        The name of the cipher desired
    @param blocklen    The minimum length of the block cipher desired (octets)
    @param keylen      The minimum length of the key size desired (octets)
@@ -26,10 +24,10 @@
 {
    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(&ltc_cipher_mutex);
    for (x = 0; x < TAB_SIZE; x++) {
@@ -45,6 +43,6 @@
    return -1;
 }
 
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref:         $Format:%D$ */
+/* git commit:  $Format:%H$ */
+/* commit time: $Format:%ai$ */