[PATCH] cryptsetup: fix segfault when trying to open a non existing device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fix segfault when trying to open a non existing device

Signed-off-by: Ludwig Nussel <ludwig.nussel@xxxxxxx>

Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
@@ -608,7 +608,7 @@ out:
 
 static int __crypt_luks_open(int arg, struct setup_backend *backend, struct crypt_options *options)
 {
-	struct luks_masterkey *mk;
+	struct luks_masterkey *mk=NULL;
 	struct luks_phdr hdr;
 	char *password; int passwordLen;
 	struct device_infos infos;
-- 
 (o_   Ludwig Nussel
 //\   
 V_/_  http://www.suse.de/
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)

---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux