summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/mmap.cc
diff options
context:
space:
mode:
authorChristian Perrier <bubulle@debian.org>2005-10-08 07:50:05 +0000
committerChristian Perrier <bubulle@debian.org>2005-10-08 07:50:05 +0000
commita76a584e46e53dea1aeaf98735079833b08472d2 (patch)
tree6f12da8dad6dde46cc253698f991d4beac8a073b /apt-pkg/contrib/mmap.cc
parent611efb3c3d25091430f5d719867e0b12eb2533a5 (diff)
parent325c0341a1b19de3c1569ce8a6ddadceb7eaf1b5 (diff)
Merge with Michael
Patches applied: * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-62 * leak fix for debian #250583 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-63 * changelog update
Diffstat (limited to 'apt-pkg/contrib/mmap.cc')
-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));
}