patch-2.4.27 linux-2.4.27/crypto/twofish.c

Next file: linux-2.4.27/drivers/acpi/Config.in
Previous file: linux-2.4.27/crypto/tea.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/crypto/twofish.c linux-2.4.27/crypto/twofish.c
@@ -663,7 +663,10 @@
 
 	/* Check key length. */
 	if (key_len != 16 && key_len != 24 && key_len != 32)
+	{
+		*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
 		return -EINVAL; /* unsupported key length */
+	}
 
 	/* Compute the first two words of the S vector.  The magic numbers are
 	 * the entries of the RS matrix, preprocessed through poly_to_exp. The

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)