Browse Source

Do not try to cast a pkgDepCache::Policy to a pkgCache

Fix incorrect cast in pkgDepCache::Policy::GetCandidateVer()

Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
tags/debian/1.0.4
Michael Vogt 7 years ago
parent
commit
de6221c9d5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      apt-pkg/depcache.cc

+ 1
- 1
apt-pkg/depcache.cc View File

@@ -1678,7 +1678,7 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator const &Pk
{
/* Not source/not automatic versions cannot be a candidate version
unless they are already installed */
VerIterator Last(*(pkgCache *)this,0);
VerIterator Last;
for (VerIterator I = Pkg.VersionList(); I.end() == false; ++I)
{


Loading…
Cancel
Save