From 474f6525c8e99c1fb78005db23dd6f254e540313 Mon Sep 17 00:00:00 2001 From: Maxim Perevedentsev Date: Thu, 22 Oct 2015 20:04:32 +0300 Subject: [PATCH] Bugfix in number parsing in vfs_min_size. --- daemon/ext2.c | 2 +- daemon/ntfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/ext2.c b/daemon/ext2.c index 342d217ed..65435746e 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -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; } diff --git a/daemon/ntfs.c b/daemon/ntfs.c index ea0844f92..8e1aa5a2d 100644 --- a/daemon/ntfs.c +++ b/daemon/ntfs.c @@ -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; }