Sfoglia il codice sorgente

Accept an empty keyfile

I've been using an empty key for testing and it works fine.
Richard Laager 15 anni fa
parent
commit
5a3e212891
1 ha cambiato i file con 0 aggiunte e 5 eliminazioni
  1. 0 5
      src/docsis.c

+ 0 - 5
src/docsis.c

@@ -239,11 +239,6 @@ main (int argc, char *argv[])
 	  exit (-5);
 	}
       keylen = fread (key, sizeof (unsigned char), 64, kf);
-      if (keylen < 1)
-	{
-	  printf ("%s: error: key must be at least 1 char long\n", prog_name );
-	  exit (-101);
-	}
       while (keylen > 0 && (key[keylen - 1] == 10 || key[keylen - 1] == 13))
 	{
 	  keylen--;		/* eliminate trailing \n or \r */