From: Michihiro NAKAJIMA Date: Wed, 28 Jan 2009 11:31:12 +0000 (-0500) Subject: Allow numerics to the option name of the options frame work. X-Git-Tag: v2.7.0~393 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=272eae156cfd2e32e0b4c918dde95dc82a2cdc81;p=thirdparty%2Flibarchive.git Allow numerics to the option name of the options frame work. SVN-Revision: 500 --- diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c index b1b6f04f3..13b1ee961 100644 --- a/libarchive/archive_util.c +++ b/libarchive/archive_util.c @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009 Michihiro NAKAJIMA * Copyright (c) 2003-2007 Tim Kientzle * All rights reserved. * @@ -249,8 +250,8 @@ __archive_parse_options(const char *p, const char *fn, int keysize, char *key, break; case F_BOTH: case F_NAME: - if (islower(*p) || *p == '-') { - if (kidx == 0 && *p == '-') + if (islower(*p) || isnumber(*p) || *p == '-') { + if (kidx == 0 && !islower(*p)) /* Illegal sequence. */ return (-1); if (kidx >= keysize -1)