diff --git a/WHATS_NEW b/WHATS_NEW index bdfe111c2..3fd6a8a4a 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.106 - ==================================== + Fix swap signature detection for devices smaller then 2MB. Reindent some clvmd.c code. Use dm_malloc function in clvmd.c. Resolve memory release order for clvmd shutdown. diff --git a/lib/device/dev-swap.c b/lib/device/dev-swap.c index f506eda5e..bf3604bb7 100644 --- a/lib/device/dev-swap.c +++ b/lib/device/dev-swap.c @@ -59,7 +59,7 @@ int dev_is_swap(struct device *dev, uint64_t *offset_found) */ if (page == 0x8000) continue; - if (size < page) + if (size < (page / 512)) break; if (!dev_read(dev, page - SIGNATURE_SIZE, SIGNATURE_SIZE, buf)) {