diff options
author | Michael Vogt <mvo@debian.org> | 2013-12-27 22:18:00 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-12-27 22:18:00 +0100 |
commit | 7e43ab9d47ad9d4712441968bd3fdf919c912c45 (patch) | |
tree | 2ef8d0f21354cabc53a8885170be636d0e2eadfb /apt-pkg/policy.cc | |
parent | 6bbd65ee4fddb59d771d3cd1f7cf7433cbbd0097 (diff) | |
parent | 75ab11ae3880530c5354cc90c8d1ff0998f8146b (diff) |
Merge branch 'feature/policy-parser-bts732746' into debian/sid
Diffstat (limited to 'apt-pkg/policy.cc')
-rw-r--r-- | apt-pkg/policy.cc | 4 |
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()); |