* apt-inst/contrib/extracttar.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 25 Jul 2006 10:59:12 +0000 (12:59 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 25 Jul 2006 10:59:12 +0000 (12:59 +0200)
  - assign the return string value from Find() before calling c_str() on
    it, otherwise the string goes out of scope and is deleted

apt-inst/contrib/extracttar.cc
debian/changelog

index d6da802..062c06f 100644 (file)
@@ -136,7 +136,8 @@ bool ExtractTar::StartGzip()
       
       const char *Args[3];
       string confvar = string("dir::bin::") + DecompressProg;
-      Args[0] = _config->Find(confvar.c_str(),DecompressProg.c_str()).c_str();
+      string argv0 = _config->Find(confvar.c_str(),DecompressProg.c_str());
+      Args[0] = argv0.c_str();
       Args[1] = "-d";
       Args[2] = 0;
       execvp(Args[0],(char **)Args);
index 8a0093d..4de7f3f 100644 (file)
@@ -15,6 +15,8 @@ apt (0.6.45) unstable; urgency=low
   * methods/gpgv.cc:
     - deal with gpg error "NODATA". Closes: #296103, Thanks to 
       Luis Rodrigo Gallardo Cruz for the patch
+  * apt-inst/contrib/extracttar.cc:
+    - fix for string mangling, closes: #373864
   * Merged from Christian Perrier bzr branch:
     * ko.po: Updated to 512t. Closes: #378901
     * hu.po: Updated to 512t. Closes: #376330
@@ -27,7 +29,7 @@ apt (0.6.45) unstable; urgency=low
     * eu.po: Updated
     * eu.po: Updated
 
- -- 
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 25 Jul 2006 11:55:22 +0200
 
 apt  (0.6.44.2) unstable; urgency=low