patch-2.3.4 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:43 1999
- Orig file:
v2.3.3/linux/drivers/block/loop.c
- Orig date:
Thu Jan 14 10:33:36 1999
diff -u --recursive --new-file v2.3.3/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)