summaryrefslogtreecommitdiff
path: root/apt-pkg/versionmatch.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2010-09-06 18:11:49 +0200
committerMichael Vogt <mvo@debian.org>2010-09-06 18:11:49 +0200
commitfb031c5598c529b98477c47eac6fe11cae4b1b66 (patch)
treede7908c98e8086a148c423e6edb3d8a6e7455491 /apt-pkg/versionmatch.cc
parenteb1115ef4e84b90189a50c15af4002e4e7306c01 (diff)
parent7753e4684e2b80abbed296b90f47be12b4fce8fc (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/versionmatch.cc')
-rw-r--r--apt-pkg/versionmatch.cc2
1 files changed, 1 insertions, 1 deletions
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;