diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:59:36 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:59:36 +0000 |
commit | b8b7c37d8931126f4536b7350c7611a9fa98e04a (patch) | |
tree | 6cf13d22660939d979686dde8e25e0759db59c44 /apt-pkg/versionmatch.cc | |
parent | 6778020c7eca2d704604ad38b20bc1fb3f3a24fb (diff) | |
download | apt-b8b7c37d8931126f4536b7350c7611a9fa98e04a.tar.gz |
Fix some unlikely segfaults
Author: jgg
Date: 2002-11-06 06:43:14 GMT
Fix some unlikely segfaults
Diffstat (limited to 'apt-pkg/versionmatch.cc')
-rw-r--r-- | apt-pkg/versionmatch.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index e7d8e4dc7..0ca850dc8 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: versionmatch.cc,v 1.6 2001/06/10 01:57:45 jgg Exp $ +// $Id: versionmatch.cc,v 1.7 2002/11/06 06:43:14 jgg Exp $ /* ###################################################################### Version Matching @@ -68,7 +68,7 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) else RelArchive = Data; - if (RelVerStr.end()[-1] == '*') + if (RelVerStr.length() > 0 && RelVerStr.end()[-1] == '*') { RelVerPrefixMatch = true; RelVerStr = string(RelVerStr.begin(),RelVerStr.end()-1); |