summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/contrib/mmap.cc4
-rw-r--r--debian/changelog5
2 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index bc22fba67..e395e6cc7 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -155,9 +155,9 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace)
unsigned long EndOfFile = Fd->Size();
if (EndOfFile > WorkSpace)
WorkSpace = EndOfFile;
- else
+ else if(WorkSpace > 0)
{
- Fd->Seek(WorkSpace);
+ Fd->Seek(WorkSpace - 1);
char C = 0;
Fd->Write(&C,sizeof(C));
}
diff --git a/debian/changelog b/debian/changelog
index acf74d166..5e3e6f153 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,7 +9,10 @@ apt (0.6.41.1) unstable; urgency=low
- patch-99: Added Galician translation
- patch-100: Completed Danish translation (Closes: #325686)
- patch-104: French translation completed
- * applied frensh man-page update (thanks to Philippe Batailler)
+ * applied french man-page update (thanks to Philippe Batailler)
+ (closes: #316318, #327456)
+ * fix leak in the mmap code, thanks to Daniel Burrows for the
+ patch (closes: #250583)
--