This bug has been fixed upstream in commit b68ce88357daf362e60d7f8f131041289c8db690
http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=commit;h=b68ce88357daf362e60d7f8f131041289c8db690
commit b68ce88357daf362e60d7f8f131041289c8db690 Author: Julian Andres Klode <email address hidden> Date: Mon Mar 17 13:43:12 2014 +0100
apt-inst: Do not try to create a substring of an empty string in error reporting
One of our compressors (the empty one) has an empty extension. Calling substr on it fails.
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 3803329..a63cb67 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -124,8 +124,10 @@ bool debDebFile::ExtractTarMember(pkgDirStream &Stream,const char *Name) { std::string ext = std::string(Name) + ".{"; for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressor.begin(); - c != compressor.end(); ++c) - ext.append(c->Extension.substr(1)); + c != compressor.end(); ++c) { + if (!c->Extension.empty()) + ext.append(c->Extension.substr(1)); + } ext.append("}"); return _error->Error(_("Internal error, could not locate member %s"), ext.c_str()); }
This bug has been fixed upstream in commit b68ce88357daf36 2e60d7f8f131041 289c8db690
http:// anonscm. debian. org/gitweb/ ?p=apt/ apt.git; a=commit; h=b68ce88357daf 362e60d7f8f1310 41289c8db690
commit b68ce88357daf36 2e60d7f8f131041 289c8db690
Author: Julian Andres Klode <email address hidden>
Date: Mon Mar 17 13:43:12 2014 +0100
apt-inst: Do not try to create a substring of an empty string in error reporting
One of our compressors (the empty one) has an empty extension. Calling substr
on it fails.
diff --git a/apt-inst/ deb/debfile. cc b/apt-inst/ deb/debfile. cc deb/debfile. cc deb/debfile. cc :ExtractTarMemb er(pkgDirStream &Stream,const char *Name) APT::Configurat ion::Compressor >::const_ iterator c = compressor.begin(); c->Extension. substr( 1)); empty() ) c->Extension. substr( 1));
ext.append( "}"); >Error( _("Internal error, could not locate member %s"), ext.c_str());
index 3803329..a63cb67 100644
--- a/apt-inst/
+++ b/apt-inst/
@@ -124,8 +124,10 @@ bool debDebFile:
{
std::string ext = std::string(Name) + ".{";
for (std::vector<
- c != compressor.end(); ++c)
- ext.append(
+ c != compressor.end(); ++c) {
+ if (!c->Extension.
+ ext.append(
+ }
return _error-
}