From: Tim Kientzle Date: Thu, 21 Jul 2016 03:27:45 +0000 (-0700) Subject: Issue 720: Allow dashes in third-party version numbers X-Git-Tag: v3.2.2~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=daf8a7bb5469cd1454f9bdadf6d6e552cf850efa;p=thirdparty%2Flibarchive.git Issue 720: Allow dashes in third-party version numbers --- diff --git a/cat/test/test_version.c b/cat/test/test_version.c index e7c93630b..e587b3440 100644 --- a/cat/test/test_version.c +++ b/cat/test/test_version.c @@ -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; } diff --git a/cpio/test/test_option_version.c b/cpio/test/test_option_version.c index 32ba30004..ac58cefda 100644 --- a/cpio/test/test_option_version.c +++ b/cpio/test/test_option_version.c @@ -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; } diff --git a/tar/test/test_version.c b/tar/test/test_version.c index 5474261d2..04d9e6c7c 100644 --- a/tar/test/test_version.c +++ b/tar/test/test_version.c @@ -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; }