Bugfix in number parsing in vfs_min_size.

This commit is contained in:
Maxim Perevedentsev
2015-10-22 20:04:32 +03:00
committed by Richard W.M. Jones
parent a1b7540b78
commit 474f6525c8
2 changed files with 3 additions and 3 deletions

View File

@@ -336,7 +336,7 @@ ext_minimum_size (const char *device)
for (i = 0; lines[i] != NULL; ++i) {
if (STRPREFIX (lines[i], pattern)) {
if (XSTRTOD64 (lines[i] + strlen (pattern),
NULL, 20, &ret, NULL) != LONGINT_OK) {
NULL, 10, &ret, NULL) != LONGINT_OK) {
reply_with_error ("cannot parse minimum size");
return -1;
}

View File

@@ -201,7 +201,7 @@ ntfs_minimum_size (const char *device)
}
else if (STRPREFIX (lines[i], volume_size_pattern)) {
if (XSTRTOD64 (lines[i] + strlen (volume_size_pattern),
NULL, 20, &volume_size, NULL) != LONGINT_OK) {
NULL, 10, &volume_size, NULL) != LONGINT_OK) {
reply_with_error ("cannot parse volume size");
return -1;
}
@@ -226,7 +226,7 @@ ntfs_minimum_size (const char *device)
if (STRPREFIX (lines[i], size_pattern)) {
int64_t ret;
if (XSTRTOD64 (lines[i] + strlen (size_pattern),
NULL, 20, &ret, NULL) != LONGINT_OK) {
NULL, 10, &ret, NULL) != LONGINT_OK) {
reply_with_error ("cannot parse minimum size");
return -1;
}