diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2013-10-13 19:33:09 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-10-14 15:04:29 +0200 |
commit | 7794a6880e74446075d9cae19525829ada5b0d91 (patch) | |
tree | a43eb96d337a4fbd5dab066f34497409d134b3ef /apt-pkg/deb | |
parent | 3eb5fb766d5faa117ab82b93b0e909011af860e1 (diff) |
fix progress-segfault in case of dpkg errors/prompts
Errors and conffile prompts have a fourth information piece,
which the "old" code access which isn't provided by the "new" one.
This isn't checking if the messages are really well-formed,
so it could still segfault on misformed messages, but this code
needs more work anyway, so one step at a time.
Closes: 726047
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index c29d21574..1fbeabbdc 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -546,8 +546,8 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line) // A dpkg error message may contain additional ":" (like // "failed in buffer_write(fd) (10, ret=-1): backend dpkg-deb ..." // so we need to ensure to not split too much - std::vector<std::string> list = StringSplit(line, ": ", 3); - if(list.size() != 3) + std::vector<std::string> list = StringSplit(line, ": ", 4); + if(list.size() < 3) { if (Debug == true) std::clog << "ignoring line: not enough ':'" << std::endl; |