X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/ba91b1518a1208fecc1ca076fd9cfbd28344b5b3..3c54407f8783d5e27363eabf41dbc3d031526ffe:/apt-pkg/versionmatch.cc diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index 17a54bc4c..c40b1fdbc 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -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;