summaryrefslogtreecommitdiff
path: root/apt-pkg/policy.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-25 22:39:21 +0100
committerMichael Vogt <mvo@debian.org>2014-01-25 22:39:21 +0100
commit72af508bdbca55d0752aab3369faa1dc944a04e7 (patch)
tree933b60b160f1876990bb02bab20fcdb491c8b560 /apt-pkg/policy.cc
parentb52e8ce26ee0ee906f8bad4dbd72eca51fb65ed7 (diff)
parente093518c03b49a2def83d8b680be4490fed6e69c (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: configure.ac debian/changelog doc/apt-verbatim.ent doc/po/apt-doc.pot po/ar.po po/ast.po po/bg.po po/bs.po po/ca.po po/cs.po po/cy.po po/da.po po/de.po po/dz.po po/el.po po/es.po po/eu.po po/fi.po po/fr.po po/gl.po po/hu.po po/it.po po/ja.po po/km.po po/ko.po po/ku.po po/lt.po po/mr.po po/nb.po po/ne.po po/nl.po po/nn.po po/pl.po po/pt.po po/pt_BR.po po/ro.po po/ru.po po/sk.po po/sl.po po/sv.po po/th.po po/tl.po po/tr.po po/uk.po po/vi.po po/zh_CN.po po/zh_TW.po
Diffstat (limited to 'apt-pkg/policy.cc')
-rw-r--r--apt-pkg/policy.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 0a06cc6e3..d0f97441d 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -405,6 +405,10 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
PreferenceSection Tags;
while (TF.Step(Tags) == true)
{
+ // can happen when there are only comments in a record
+ if (Tags.Count() == 0)
+ continue;
+
string Name = Tags.FindS("Package");
if (Name.empty() == true)
return _error->Error(_("Invalid record in the preferences file %s, no Package header"), File.c_str());