]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Allow numerics to the option name of the options frame work.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 28 Jan 2009 11:31:12 +0000 (06:31 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 28 Jan 2009 11:31:12 +0000 (06:31 -0500)
SVN-Revision: 500

libarchive/archive_util.c

index b1b6f04f3ccc04e89347c2e6119b12895571d860..13b1ee961913fa0947b218be442febff0a65b4b5 100644 (file)
@@ -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)