diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-09-18 17:46:03 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-09-18 17:46:03 +0100 |
commit | c9034b42ab8da606fc0214dbad54025fc4b586af (patch) | |
tree | 2a41f05dc329dc7c58a643904da0a73878138922 /apt-pkg | |
parent | 04d0fa8803bcd70437cc1033f333d0992b28a329 (diff) | |
parent | f26fcbc707e106946e18682f917ebd6f96444302 (diff) |
* apt-pkg/deb/dpkgpm.cc:
- fix parse error when dpkg sends unexpected data
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 7e1933f06..e1e26e903 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -393,14 +393,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) { |