summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-09-28 08:11:11 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-09-28 08:11:11 +0000
commitea92d0369e9848714f13a808c0bc8f2e5a53969a (patch)
treeeb300e791284af9ff26d73db387a092529ea37b3 /apt-pkg
parentbae108264e918e6f256d36bfce2a6c79b4b2a3ed (diff)
* leak fix for debian #250583
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/mmap.cc4
1 files changed, 2 insertions, 2 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));
}