From: Michael Vogt Date: Thu, 27 Sep 2007 17:23:55 +0000 (+0200) Subject: * apt-pkg/acquire-item.cc: X-Git-Tag: 0.7.21~229 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/e9fce64bd454e68641a265d384669217f2bc0558?hp=--cc * apt-pkg/acquire-item.cc: - fix crash in diff acquire code * apt-pkg/contrib/mmap.cc: - don't fail if msync() returns > 0 --- e9fce64bd454e68641a265d384669217f2bc0558 diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 32798335c..c38a50194 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -345,7 +345,7 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, */ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, string URI,string URIDesc,string ShortDesc, - HashString ExpectedMD5, + HashString ExpecteHash, vector diffs) : Item(Owner), RealURI(URI), ExpectedHash(ExpectedHash), available_patches(diffs) diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 7f814c2d2..abcae46fe 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -117,7 +117,7 @@ bool MMap::Sync() #ifdef _POSIX_SYNCHRONIZED_IO if ((Flags & ReadOnly) != ReadOnly) - if (msync((char *)Base,iSize,MS_SYNC) != 0) + if (msync((char *)Base,iSize,MS_SYNC) < 0) return _error->Errno("msync","Unable to write mmap"); #endif return true; @@ -134,7 +134,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) #ifdef _POSIX_SYNCHRONIZED_IO unsigned long PSize = sysconf(_SC_PAGESIZE); if ((Flags & ReadOnly) != ReadOnly) - if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0) + if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0) return _error->Errno("msync","Unable to write mmap"); #endif return true; diff --git a/debian/changelog b/debian/changelog index a271c6a6c..e1d166fdf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ apt (0.7.7) UNRELEASED; urgency=low * cmdline/apt-get.cc: - do not change the auto-installed information if a package is reinstalled + * apt-pkg/acquire-item.cc: + - fix crash in diff acquire code * cmdline/apt-mark: - Fix chmoding after have renamed the extended-states file (LP: #140019) (thanks to Laurent Bigonville) @@ -41,6 +43,10 @@ apt (0.7.7) UNRELEASED; urgency=low [ Ian Jackson ] * dpkg-triggers: Deal properly with new package states. + [ Colin Watson ] + * apt-pkg/contrib/mmap.cc: + - don't fail if msync() returns > 0 + -- Michael Vogt Thu, 02 Aug 2007 11:55:54 +0200 apt (0.7.6) unstable; urgency=low