Просмотр исходного кода

* apt-pkg/deb/dpkgpm.cc:
- fix parse error when dpkg sends unexpected data

Michael Vogt лет назад: 19
Родитель
Сommit
c9034b42ab
3 измененных файлов с 11 добавлено и 4 удалено
  1. 3 3
      apt-pkg/deb/dpkgpm.cc
  2. 1 1
      configure.in
  3. 7 0
      debian/changelog

+ 3 - 3
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)
    {

+ 1 - 1
configure.in

@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.7.6ubuntu9")
+AC_DEFINE_UNQUOTED(VERSION,"0.7.6ubuntu10")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)

+ 7 - 0
debian/changelog

@@ -1,3 +1,10 @@
+apt (0.7.6ubuntu10) gutsy; urgency=low
+
+  * apt-pkg/deb/dpkgpm.cc:
+    - fix parse error when dpkg sends unexpected data
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 18 Sep 2007 17:25:09 +0100
+
 apt (0.7.6ubuntu9) gutsy; urgency=low
 
   * apt-pkg/deb/dpkgpm.cc: