aboutsummaryrefslogtreecommitdiff
path: root/src/xz/util.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/xz/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xz/util.c b/src/xz/util.c
index 9843c044..d200bfca 100644
--- a/src/xz/util.c
+++ b/src/xz/util.c
@@ -45,6 +45,10 @@ str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
while (*value == ' ' || *value == '\t')
++value;
+ // Accept special value "max". Supporting "min" doesn't seem useful.
+ if (strcmp(value, "max") == 0)
+ return max;
+
if (*value < '0' || *value > '9')
message_fatal(_("%s: Value is not a non-negative "
"decimal integer"), value);