summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc2
-rw-r--r--apt-pkg/contrib/mmap.cc4
-rw-r--r--debian/changelog6
3 files changed, 9 insertions, 3 deletions
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<DiffInfo> 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 <michael.vogt@ubuntu.com> Thu, 02 Aug 2007 11:55:54 +0200
apt (0.7.6) unstable; urgency=low