From a46272c01ef6fda081250b63ff0b6b76ec671cda Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 24 Jul 2006 22:49:39 +0200 Subject: * apt-pkg/contrib/sha256.cc: - fix the sha256 code (thanks to Jakob Bohm, closes: #378183) --- apt-pkg/contrib/sha256.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/sha256.cc b/apt-pkg/contrib/sha256.cc index ad2ddb2d3..b75ce8a84 100644 --- a/apt-pkg/contrib/sha256.cc +++ b/apt-pkg/contrib/sha256.cc @@ -61,10 +61,10 @@ static inline u32 Maj(u32 x, u32 y, u32 z) static inline void LOAD_OP(int I, u32 *W, const u8 *input) { - W[I] = ( ((u32) input[I + 0] << 24) - | ((u32) input[I + 1] << 16) - | ((u32) input[I + 2] << 8) - | ((u32) input[I + 3])); + W[I] = ( ((u32) input[I * 4 + 0] << 24) + | ((u32) input[I * 4 + 1] << 16) + | ((u32) input[I * 4 + 2] << 8) + | ((u32) input[I * 4 + 3])); } static inline void BLEND_OP(int I, u32 *W) -- cgit v1.2.3 From 5e9179a6a301de5e6cb0f99098b467d5c35ab8d5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 25 Jul 2006 11:37:20 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - ignore lines that can't be split properly from dpkg (DpkgPM::Go) * doc/examples/configure-index: - documentation updates --- apt-pkg/deb/dpkgpm.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 667db8ff2..bf0434ccc 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -624,7 +624,13 @@ bool pkgDPkgPM::Go(int OutStatusFd) */ char* list[5]; - TokSplitString(':', line, list, sizeof(list)/sizeof(list[0])); + if(!TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]))) + // FIXME: dpkg sends multiline error messages sometimes (see + // #374195 for a example. we should support this by + // either patching dpkg to not send multiline over the + // statusfd or by rewriting the code here to deal with + // it. for now we just ignore it and not crash + continue; char *pkg = list[1]; char *action = _strstrip(list[2]); -- cgit v1.2.3 From 4577fda2b5f2b21f5400d10f4db71a8095f0df58 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 25 Jul 2006 13:48:17 +0200 Subject: * apt-pkg/acquire-item.cc: - check "/bin/bzip2" instead of "/usr/bin/bzip2" --- apt-pkg/acquire-item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 1fa929aad..421288007 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -149,7 +149,7 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner, if(comprExt.empty()) { // autoselect the compression method - if(FileExists("/usr/bin/bzip2")) + if(FileExists("/bin/bzip2")) CompressionExtension = ".bz2"; else CompressionExtension = ".gz"; -- cgit v1.2.3