summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2007-10-02 13:52:22 +0200
committerMichael Vogt <egon@bottom>2007-10-02 13:52:22 +0200
commit3346b385523c596c1db7667b4874a8617718de70 (patch)
tree9bef8479ffdc2e80ae83ffdf02255aac0b0beb9d /apt-pkg/deb/dpkgpm.cc
parent36fc5dca8b8eaa38a4ebd3ec52b462df44dd1b82 (diff)
parent59d5cc74ef7c6ca820ed9d26a4d829b891214edf (diff)
- fix parse error when dpkg sends unexpected data
* fix missing SetExecClose() call when the status-fd is used * debian/apt.cron.daily: - move unattended-upgrade before apt-get autoclean * fix "purge" commandline argument, closes: #133421 (thanks to Julien Danjou for the patch) * cmdline/apt-get.cc: - do not change the auto-installed information if a package is reinstalled * apt-pkg/acquire-item.cc: - fix crash in diff acquire code * cmdline/apt-mark: - Fix chmoding after have renamed the extended-states file (LP: #140019) (thanks to Laurent Bigonville) * apt-pkg/contrib/mmap.cc: - don't fail if msync() returns > 0
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index ac63ccfdf..b92d0118c 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -392,14 +392,14 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line)
// statusfd or by rewriting the code here to deal with
// it. for now we just ignore it and not crash
TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]));
- char *pkg = list[1];
- char *action = _strstrip(list[2]);
- if( pkg == NULL || action == NULL)
+ if( list[0] == NULL || list[1] == NULL || list[2] == NULL)
{
if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
std::clog << "ignoring line: not enough ':'" << std::endl;
return;
}
+ char *pkg = list[1];
+ char *action = _strstrip(list[2]);
if(strncmp(action,"error",strlen("error")) == 0)
{