mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Bugfix in number parsing in vfs_min_size.
This commit is contained in:
committed by
Richard W.M. Jones
parent
a1b7540b78
commit
474f6525c8
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user