summaryrefslogtreecommitdiff
path: root/apt-inst/contrib
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-07-25 12:59:12 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-07-25 12:59:12 +0200
commita9be43ff002473c6a4c5197ba3767ee938ae3ed1 (patch)
tree76265d1c0ee92f724a6ed65320333a968663b5b3 /apt-inst/contrib
parent2abb68b77d4be00173c0aaab7d05277a053d3c5f (diff)
downloadapt-a9be43ff002473c6a4c5197ba3767ee938ae3ed1.tar.gz
* apt-inst/contrib/extracttar.cc:
- assign the return string value from Find() before calling c_str() on it, otherwise the string goes out of scope and is deleted
Diffstat (limited to 'apt-inst/contrib')
-rw-r--r--apt-inst/contrib/extracttar.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index d6da802fe..062c06fa4 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -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);