]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue 720: Allow dashes in third-party version numbers
authorTim Kientzle <kientzle@gmail.com>
Thu, 21 Jul 2016 03:27:45 +0000 (20:27 -0700)
committerTim Kientzle <kientzle@gmail.com>
Thu, 21 Jul 2016 03:27:45 +0000 (20:27 -0700)
cat/test/test_version.c
cpio/test/test_option_version.c
tar/test/test_version.c

index e7c93630b499af101b47a900672e992ae977c16b..e587b3440c6d622871ca47be0e868ada54711178 100644 (file)
@@ -83,7 +83,7 @@ DEFINE_TEST(test_version)
        if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd')
                ++q;
        /* Skip arbitrary third-party version numbers. */
-       while (s > 0 && (*q == ' ' || *q == '/' || *q == '.' || isalnum(*q))) {
+       while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) {
                ++q;
                --s;
        }
index 32ba3000477eff35496390500ba5dfe6ff0935f2..ac58cefda11f60c6c02f4cdf097db607ecb909c0 100644 (file)
@@ -75,7 +75,7 @@ verify(const char *p, size_t s)
        if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd')
                ++q;
        /* Skip arbitrary third-party version numbers. */
-       while (s > 0 && (*q == ' ' || *q == '/' || *q == '.' || isalnum(*q))) {
+       while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) {
                ++q;
                --s;
        }
index 5474261d207af0d2f7f1ae87738577c32e1dfa7b..04d9e6c7ca9285291378fbc0df63baa92228d5a9 100644 (file)
@@ -88,7 +88,7 @@ DEFINE_TEST(test_version)
        if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd')
                ++q;
        /* Skip arbitrary third-party version numbers. */
-       while (s > 0 && (*q == ' ' || *q == '/' || *q == '.' || isalnum(*q))) {
+       while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) {
                ++q;
                --s;
        }