X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/74de13d19c5c9bd1d7d1acde810fcb5bd398a359..1db954e9bca018594c9626c92999847d0d1170c5:/options.c diff --git a/options.c b/options.c index 198a9031..a5b862fd 100644 --- a/options.c +++ b/options.c @@ -666,11 +666,10 @@ static OFF_T parse_size_arg(char **size_arg, char def_suf) mult = 1024; if ((p = strstr(arg, "+1")) != NULL || (p = strstr(arg, "-1")) != NULL) { - if (p[2] == '\0') { - size = atoi(p + (*p == '+')); - make_compatible = 1; - } else - p = NULL; + if (p[2] != '\0') + return -1; + size = atoi(p); + make_compatible = 1; } switch (*arg && arg != p ? *arg : def_suf) { case 'b': case 'B':