patch-2.2.10 linux/drivers/block/loop.c
Next file: linux/drivers/block/ns87415.c
Previous file: linux/drivers/block/ide.c
Back to the patch index
Back to the overall index
- Lines: 9
- Date:
Sun May 30 10:17:03 1999
- Orig file:
v2.2.9/linux/drivers/block/loop.c
- Orig date:
Tue Jan 19 11:32:51 1999
diff -u --recursive --new-file v2.2.9/linux/drivers/block/loop.c linux/drivers/block/loop.c
@@ -504,6 +504,8 @@
if ((unsigned int) info.lo_encrypt_key_size > LO_KEY_SIZE)
return -EINVAL;
type = info.lo_encrypt_type;
+ if (info.lo_encrypt_key_size == 0 && type == LO_CRYPT_XOR)
+ return -EINVAL;
if (type >= MAX_LO_CRYPT || xfer_funcs[type] == NULL)
return -EINVAL;
err = loop_release_xfer(lo);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)