summaryrefslogtreecommitdiff
path: root/apt-pkg/versionmatch.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2013-04-08 15:38:45 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2013-04-08 15:38:45 +0200
commit3278fe66567d149ea92c1afa78941f2bc3c71c85 (patch)
tree3a735d19278bb8f5aa19ba2707f3a09cf52e1d21 /apt-pkg/versionmatch.cc
parent37cc828e003f51d63ed991be5acac36765b8230a (diff)
parent885594fc8831d1be5a254557385e3dbefb564fbf (diff)
merged bundle from david
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 e4fa0ea65..26262a010 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -181,9 +181,9 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg)
bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string)
{
if (pattern[0] == '/') {
- bool res = false;
size_t length = strlen(pattern);
if (pattern[length - 1] == '/') {
+ bool res = false;
regex_t preg;
char *regex = strdup(pattern + 1);
regex[length - 2] = '\0';