aboutsummaryrefslogtreecommitdiff
path: root/src/xzdec/xzdec.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/xzdec/xzdec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c
index 6c1f8249..90bc6579 100644
--- a/src/xzdec/xzdec.c
+++ b/src/xzdec/xzdec.c
@@ -86,7 +86,7 @@ help(void)
" MiB of memory at maximum.\n"
"\n"
"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n",
- argv0, (memlimit + 512 * 1024) / (1024 * 1024));
+ argv0, memlimit / (1024 * 1024));
my_exit();
}
@@ -128,6 +128,10 @@ str_to_uint64(const char *value)
{
uint64_t result = 0;
+ // Accept special value "max".
+ if (strcmp(value, "max") == 0)
+ return UINT64_MAX;
+
if (*value < '0' || *value > '9') {
fprintf(stderr, "%s: %s: Not a number\n", argv0, value);
exit(EXIT_FAILURE);