mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Do not fail if device is smaller than requested wipe size.
This commit is contained in:
@@ -164,6 +164,9 @@ int crypt_wipe_device(struct crypt_device *cd,
|
||||
if (r || dev_size == 0)
|
||||
goto out;
|
||||
|
||||
if (dev_size < length)
|
||||
length = 0;
|
||||
|
||||
if (length) {
|
||||
if ((dev_size <= offset) || (dev_size - offset) < length) {
|
||||
r = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user