]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/versionmatch.cc
apt-pkg/contrib/md5.cc: fix md5sum by using the right type (unsinged char*) and avoid...
[apt.git] / apt-pkg / versionmatch.cc
index 17a54bc4c5a3dd9582cafe28c2d64fde8d161860..c40b1fdbc859b0875192ac79ca55a3d461fc6e43 100644 (file)
@@ -118,7 +118,7 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type)
    
    if (Type == Origin)
    {
-      if (Data[0] == '"' && Data.end()[-1] == '"')
+      if (Data[0] == '"' && Data.length() >= 2 && Data.end()[-1] == '"')
         OrSite = Data.substr(1, Data.length() - 2);
       else
         OrSite = Data;