Commit
9b4b5d449ef7045d33b8d8d7e69011d16f4bb8ab started to accept
rather way to wide set of strings we do not want to take for size.
i.e. lvresize -t vg0/lvol0 -LNaNM
Restore check for 'digit || locales defined 'dot' | '.'
(as we tend to take '.' even if locales uses ',')
#include <dirent.h>
#include <paths.h>
#include <locale.h>
+#include <langinfo.h>
#ifdef HAVE_VALGRIND
#include <valgrind.h>
char *val;
double v;
uint64_t v_tmp, adjustment;
+ char *radixchar = nl_langinfo(RADIXCHAR);
av->percent = PERCENT_NONE;
return 0;
}
+
+ if (!isdigit(*val) &&
+ (*val != '.') &&
+ (radixchar && (*val != radixchar[0]))) {
+ log_error("Size requires number argument.");
+ return 0;
+ }
+
errno = 0;
v = strtod(val, &ptr);