Bug#401017: NMU uploaded
Hi,
as agreed on IRC, I uploaded an NMU of your package.
Please find the used diff below.
Cheers,
Andi
diff -Nru /tmp/lF0wIU5S1h/apt-0.6.46.3/apt-pkg/acquire-item.cc /tmp/KFa23oVzhG/apt-0.6.46.3/apt-pkg/acquire-item.cc
--- /tmp/lF0wIU5S1h/apt-0.6.46.3/apt-pkg/acquire-item.cc 2006-07-26 22:30:51.000000000 +0000
+++ /tmp/KFa23oVzhG/apt-0.6.46.3/apt-pkg/acquire-item.cc 2006-12-05 10:40:42.000000000 +0000
@@ -276,7 +276,8 @@
if(Debug)
std::clog << "Can't find a patch in the index file" << std::endl;
// Failed will queue a big package file
- Failed("", NULL);
+ // don't queue anymore - we do that outside already - see #401017
+ //Failed("", NULL);
}
else
{
diff -Nru /tmp/lF0wIU5S1h/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.cc /tmp/KFa23oVzhG/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.cc
--- /tmp/lF0wIU5S1h/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.cc 2006-03-02 13:44:28.000000000 +0000
+++ /tmp/KFa23oVzhG/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.cc 2006-12-05 10:34:49.000000000 +0000
@@ -18,6 +18,8 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
+
+using std::max;
/*}}}*/
// SrcRecordParser::Binaries - Return the binaries field /*{{{*/
@@ -34,31 +36,19 @@
if (Bins.empty() == true || Bins.length() >= 102400)
return 0;
- // Workaround for #236688. Only allocate a new buffer if the field
- // is large, to avoid a performance penalty
- char *BigBuf = NULL;
- char *Buf;
- if (Bins.length() > sizeof(Buffer))
- {
- BigBuf = new char[Bins.length()];
- Buf = BigBuf;
- }
- else
+ if (Bins.length() >= BufSize)
{
- Buf = Buffer;
+ delete [] Buffer;
+ // allocate new size based on buffer (but never smaller than 4000)
+ BufSize = max((unsigned long)4000, max(Bins.length()+1,2*BufSize));
+ Buffer = new char[BufSize];
}
- strcpy(Buf,Bins.c_str());
- if (TokSplitString(',',Buf,StaticBinList,
+ strcpy(Buffer,Bins.c_str());
+ if (TokSplitString(',',Buffer,StaticBinList,
sizeof(StaticBinList)/sizeof(StaticBinList[0])) == false)
- {
- if (BigBuf != NULL)
- delete BigBuf;
return 0;
- }
- if (BigBuf != NULL)
- delete BigBuf;
return (const char **)StaticBinList;
}
/*}}}*/
diff -Nru /tmp/lF0wIU5S1h/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.h /tmp/KFa23oVzhG/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.h
--- /tmp/lF0wIU5S1h/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.h 2006-03-02 13:44:28.000000000 +0000
+++ /tmp/KFa23oVzhG/apt-0.6.46.3/apt-pkg/deb/debsrcrecords.h 2006-12-05 10:34:49.000000000 +0000
@@ -24,9 +24,10 @@
FileFd Fd;
pkgTagFile Tags;
pkgTagSection Sect;
- char Buffer[10000];
char *StaticBinList[400];
unsigned long iOffset;
+ char *Buffer;
+ unsigned long BufSize;
public:
@@ -49,10 +50,9 @@
};
virtual bool Files(vector<pkgSrcRecords::File> &F);
- debSrcRecordParser(string File,pkgIndexFile const *Index) :
- Parser(Index),
- Fd(File,FileFd::ReadOnly),
- Tags(&Fd,102400) {};
+ debSrcRecordParser(string File,pkgIndexFile const *Index)
+ : Parser(Index), Fd(File,FileFd::ReadOnly), Tags(&Fd,102400),
+ Buffer(0), BufSize(0) {}
};
#endif
diff -Nru /tmp/lF0wIU5S1h/apt-0.6.46.3/configure /tmp/KFa23oVzhG/apt-0.6.46.3/configure
--- /tmp/lF0wIU5S1h/apt-0.6.46.3/configure 2006-11-02 10:38:17.000000000 +0000
+++ /tmp/KFa23oVzhG/apt-0.6.46.3/configure 2006-12-05 10:51:52.000000000 +0000
@@ -1773,7 +1773,7 @@
cat >>confdefs.h <<_ACEOF
-#define VERSION "0.6.46.3"
+#define VERSION "0.6.46.3-0.1"
_ACEOF
PACKAGE="apt"
diff -Nru /tmp/lF0wIU5S1h/apt-0.6.46.3/configure.in /tmp/KFa23oVzhG/apt-0.6.46.3/configure.in
--- /tmp/lF0wIU5S1h/apt-0.6.46.3/configure.in 2006-10-30 07:51:28.000000000 +0000
+++ /tmp/KFa23oVzhG/apt-0.6.46.3/configure.in 2006-12-05 10:43:32.000000000 +0000
@@ -18,7 +18,7 @@
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.46.3")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.46.3-0.1")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
diff -Nru /tmp/lF0wIU5S1h/apt-0.6.46.3/debian/apt.postinst /tmp/KFa23oVzhG/apt-0.6.46.3/debian/apt.postinst
--- /tmp/lF0wIU5S1h/apt-0.6.46.3/debian/apt.postinst 2006-03-02 14:10:27.000000000 +0000
+++ /tmp/KFa23oVzhG/apt-0.6.46.3/debian/apt.postinst 2006-12-05 10:38:36.000000000 +0000
@@ -20,6 +20,8 @@
cp /usr/share/apt/debian-archive.gpg /etc/apt/trusted.gpg
fi
+ apt-key update
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -Nru /tmp/lF0wIU5S1h/apt-0.6.46.3/debian/changelog /tmp/KFa23oVzhG/apt-0.6.46.3/debian/changelog
--- /tmp/lF0wIU5S1h/apt-0.6.46.3/debian/changelog 2006-11-02 10:37:58.000000000 +0000
+++ /tmp/KFa23oVzhG/apt-0.6.46.3/debian/changelog 2006-12-05 10:43:00.000000000 +0000
@@ -1,3 +1,13 @@
+apt (0.6.46.3-0.1) unstable; urgency=high
+
+ * Non-maintainer upload with permission of Michael Vogt.
+ * Fix segfault at apt-get source. Closes: #400874
+ * Add apt-key update in postinst, so that debian-archive-keyring doesn't
+ need to depend on apt >= 0.6. Closes: #401114
+ * Don't double-queue pdiff files. Closes: #401017
+
+ -- Andreas Barth <aba@not.so.argh.org> Tue, 5 Dec 2006 10:34:56 +0000
+
apt (0.6.46.3) unstable; urgency=low
* apt-pkg/deb/dpkgpm.cc:
--
http://home.arcor.de/andreas-barth/
Reply to: