The following commit has been merged in the master branch:
commit ac65897081f5f20fda853beed79c28559fe33aea
Author: Guillem Jover <[email protected]>
Date:   Wed Nov 3 07:36:16 2010 +0100

    libdpkg: Fix version_strict_check() to not allow '-' in revision
    
    The revision cannot possibly have a '-' in it, so do not allow it. This
    is innocuous in the current code as the parser makes sure the versions
    are split on last '-', which implies the revision will never have one,
    but it could happen that a manually constructed versionrevision could
    contain one.

diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index 8f18367..662c011 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -271,7 +271,7 @@ version_strict_check(struct versionrevision *rversion)
       return _("invalid character in version number");
   }
   for (ptr = rversion->revision; *ptr; ptr++) {
-    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~", *ptr) == NULL)
+    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".+~", *ptr) == NULL)
       return _("invalid character in revision number");
   }
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to