Messages in this thread Patch in this message | | | Date | Thu, 11 Nov 2004 17:44:44 +0000 | From | Alasdair G Kergon <> | Subject | [PATCH] device-mapper: dm-crypt fix for zero-length key |
| |
dm-crypt fix for zero-length key.
Signed-Off-By: Christophe Saout <christophe@saout.de> Signed-Off-By: Alasdair G Kergon <agk@redhat.com> --- diff/drivers/md/dm-crypt.c 2004-11-10 15:05:04.000000000 +0000 +++ source/drivers/md/dm-crypt.c 2004-11-10 15:05:24.000000000 +0000 @@ -569,8 +569,8 @@ } cc->key_size = key_size; - if ((key_size == 0 && strcmp(argv[1], "-") != 0) - || crypt_decode_key(cc->key, argv[1], key_size) < 0) { + if ((!key_size && strcmp(argv[1], "-") != 0) || + (key_size && crypt_decode_key(cc->key, argv[1], key_size) < 0)) { ti->error = PFX "Error decoding key"; goto bad1; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |