mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
format-text: ensure aligment is not 0
Make sure this path of code is not used for alignment == 0, to prevent division by 0.
This commit is contained in:
parent
5a4137c804
commit
01c438a96c
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.105 -
|
Version 2.02.105 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Check for non-zero aligment in _text_pv_add_metadata_area() to not div by 0.
|
||||||
Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
|
Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
|
||||||
Add configure --enable-blkid_wiping to use libblkid to detect signatures.
|
Add configure --enable-blkid_wiping to use libblkid to detect signatures.
|
||||||
Add -W/--wipesignatures lvcreate option to support wiping on new LVs.
|
Add -W/--wipesignatures lvcreate option to support wiping on new LVs.
|
||||||
|
@ -2083,7 +2083,7 @@ static int _text_pv_add_metadata_area(const struct format_type *fmt,
|
|||||||
* alignment since it would be useless.
|
* alignment since it would be useless.
|
||||||
* Check first whether we can apply that!
|
* Check first whether we can apply that!
|
||||||
*/
|
*/
|
||||||
if (!pe_start_locked &&
|
if (!pe_start_locked && alignment &&
|
||||||
((limit - mda_start) > alignment * 2)) {
|
((limit - mda_start) > alignment * 2)) {
|
||||||
mda_size = limit - mda_start - alignment * 2;
|
mda_size = limit - mda_start - alignment * 2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user