Displaying 1 result from an estimated 1 matches for "6feb564".
Did you mean:
6fbb5b64
2019 Feb 08
2
[PATCH nbdkit v2] server: utils: Make nbdkit_parse_size to reject negative values
...24 * 1024 * 1024 * 1024 },
+ { "8191p", 1024LL * 1024 * 1024 * 1024 * 1024 * 8191 },
{ "1e", 1024LL * 1024 * 1024 * 1024 * 1024 * 1024 },
{ "1E", 1024LL * 1024 * 1024 * 1024 * 1024 * 1024 },
};
diff --git a/server/utils.c b/server/utils.c
index 18011fd..6feb564 100644
--- a/server/utils.c
+++ b/server/utils.c
@@ -88,21 +88,30 @@ nbdkit_absolute_path (const char *path)
int64_t
nbdkit_parse_size (const char *str)
{
- uint64_t size;
+ int64_t size;
char *end;
uint64_t scale = 1;
- /* Disk sizes cannot usefully exceed off_t (which is signed), so...