提交 5a3558c6 编写于 作者: E Erik Skultety

storage: Fix a NULL ptr dereference in virStorageBackendCreateQemuImg

There was a missing check for vol->target.encryption being NULL
at one particular place (modified by commit a48c7141) which caused a crash
when user attempted to create a raw volume using a non-raw file volume as
source.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1363636Signed-off-by: NErik Skultety <eskultet@redhat.com>
上级 5b7dedc9
......@@ -1459,6 +1459,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
goto cleanup;
if (vol->target.format == VIR_STORAGE_FILE_RAW &&
vol->target.encryption &&
vol->target.encryption->format == VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) {
if (!(secretPath =
virStorageBackendCreateQemuImgSecretPath(conn, pool, vol)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册