]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 30 Oct 2006 09:39:18 +0000 (10:39 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 30 Oct 2006 09:39:18 +0000 (10:39 +0100)
  - fix segfault if dpkg sends multiline error messages

apt-pkg/deb/dpkgpm.cc
configure.in
debian/changelog

index 2b167dbf6f31c79765135f2d416f27843b40d4cb..4c44cd01a2ad062b06c545688434c3cb18efd0d1 100644 (file)
@@ -624,15 +624,20 @@ bool pkgDPkgPM::Go(int OutStatusFd)
            
         */
         char* list[5];
-        if(!TokSplitString(':', line, list, sizeof(list)/sizeof(list[0])))
-           // FIXME: dpkg sends multiline error messages sometimes (see
-           //        #374195 for a example. we should support this by
-           //        either patching dpkg to not send multiline over the
-           //        statusfd or by rewriting the code here to deal with
-           //        it. for now we just ignore it and not crash
-           continue;
+        //        dpkg sends multiline error messages sometimes (see
+        //        #374195 for a example. we should support this by
+        //        either patching dpkg to not send multiline over the
+        //        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 (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
+              std::clog << "ignoring line: not enough ':'" << std::endl;
+           continue;
+        }
 
         if(strncmp(action,"error",strlen("error")) == 0)
         {
index 35d0ea5ee7a39ee5fa96e1936fa01db23e21b9f5..81f327c378ff03c8810151861adbcf47ed6d0630 100644 (file)
@@ -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.6.45.1")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.46.3")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 2aa21c3995519b02ff38bc5c7d090a06f2576ef2..887d2f2545f623629a2a759ea212b1ea2e152f91 100644 (file)
@@ -1,3 +1,11 @@
+apt (0.6.46.3) unstable; urgency=low
+
+  * apt-pkg/deb/dpkgpm.cc:
+    - make progress reporting robust against multiline error
+      messages 
+
+ --
+
 apt (0.6.46.2) unstable; urgency=low
 
   * Merged from Christian Perrier bzr branch:
@@ -6,6 +14,7 @@ apt (0.6.46.2) unstable; urgency=low
     - cs.po: Updated. Closes: #391064
     - es.po: Updated to 514t. Closes: #391661
     - da.po: Updated to 514t. Closes: #391424
+  
  -- Michael Vogt <mvo@debian.org>  Wed, 11 Oct 2006 09:03:15 +0200
 
 apt (0.6.46.1) unstable; urgency=low