diff options
-rw-r--r-- | apt-pkg/contrib/mmap.cc | 4 | ||||
-rw-r--r-- | debian/changelog | 5 |
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 ac1e0e663..1f504f2c5 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) -- |