diff --git a/WHATS_NEW b/WHATS_NEW index 477d4ea92..48ec6793b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.173 - ================================= + Improve --size args validation and report more detailed error message. Initialize debugging mutex before any debug message in clvmd. Log error instad of warn when noticing connection problem with lvmetad. Fix memory leak in lvmetad when working with duplicates. diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 700593cc3..d3523be17 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -617,7 +617,8 @@ static int _size_arg(struct cmd_context *cmd __attribute__((unused)), } else v *= factor; - if ((uint64_t) v >= (UINT64_MAX >> SECTOR_SHIFT)) { + /* Compare (double) */ + if (v >= (double) (UINT64_MAX >> SECTOR_SHIFT)) { log_error("Size is too big (>=16EiB)."); return 0; }