diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-08-28 21:07:55 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-08-28 21:07:55 +0200 |
commit | 6abe26994fd82bef9bc357055d1dc4feee261a4d (patch) | |
tree | 72e201eab5b212b073ea5cdd9486dd9a78ba3ea5 | |
parent | b74d2d3af3238210bfafe57562d3670327918cd9 (diff) |
* apt-pkg/acquire-item.cc:
- do not segfault on invalid items (closes: #544080)
-rw-r--r-- | .bzr-builddeb/default.conf.orig | 2 | ||||
-rw-r--r-- | apt-pkg/acquire-item.cc | 26 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | debian/changelog | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/.bzr-builddeb/default.conf.orig b/.bzr-builddeb/default.conf.orig deleted file mode 100644 index 9c55498ce..000000000 --- a/.bzr-builddeb/default.conf.orig +++ /dev/null @@ -1,2 +0,0 @@ -[BUILDDEB] -native = true diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 94341c81a..afb3daad3 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -596,21 +596,21 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ if(Desc.URI.substr(nameLen) != *t) continue; - // we want to try it with the next extension + // we want to try it with the next extension (and make sure to + // not skip over the end) t++; + if (t == types.end()) + break; - if (t != types.end()) - { - Desc.URI = Desc.URI.substr(0, nameLen) + *t; - - new pkgAcqIndex(Owner, RealURI, Desc.Description, Desc.ShortDesc, - ExpectedHash, string(".").append(*t)); - - Status = StatDone; - Complete = false; - Dequeue(); - return; - } + // queue new download + Desc.URI = Desc.URI.substr(0, nameLen) + *t; + new pkgAcqIndex(Owner, RealURI, Desc.Description, Desc.ShortDesc, + ExpectedHash, string(".").append(*t)); + + Status = StatDone; + Complete = false; + Dequeue(); + return; } // on decompression failure, remove bad versions in partial/ diff --git a/configure.in b/configure.in index ff11078b3..a56544c6a 100644 --- a/configure.in +++ b/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.22.3") +AC_DEFINE_UNQUOTED(VERSION,"0.7.23.1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 5fff5fdc5..ab9457086 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ apt (0.7.23.1) UNRELEASED; urgency=low triggers-pending state. dpkg will deal with the trigger and it if does it before we trigger it, dpkg will error out (LP: #414631) + * apt-pkg/acquire-item.cc: + - do not segfault on invalid items (closes: #544080) -- Michael Vogt <mvo@debian.org> Fri, 28 Aug 2009 18:53:20 +0200 |