diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2016-11-08 12:47:02 +0300 |
---|---|---|
committer | Kenneth Skovhede <kenneth@hexad.dk> | 2016-11-08 12:47:02 +0300 |
commit | cdba1211a54c76b39151cf16e44a081377477b7a (patch) | |
tree | ce9f3cdc0bf6ecddd9ebc0a12f5fcc52866dd2d3 | |
parent | 1b3aec8c29b422235785250095b59382def04ce0 (diff) |
Fixed integer overflow when calculating maximum metadata size.
This fixes #2089
-rw-r--r-- | Duplicati/Library/Main/Operation/BackupHandler.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Duplicati/Library/Main/Operation/BackupHandler.cs b/Duplicati/Library/Main/Operation/BackupHandler.cs index 90e5df11a..b1d5d5293 100644 --- a/Duplicati/Library/Main/Operation/BackupHandler.cs +++ b/Duplicati/Library/Main/Operation/BackupHandler.cs @@ -685,7 +685,7 @@ namespace Duplicati.Library.Main.Operation throw new Exception("The database was attempted repaired, but the repair did not complete. This database may be incomplete and the backup process cannot continue. You may delete the local database and attempt to repair it again.");
m_blocksize = m_options.Blocksize;
- m_maxmetadatasize = (m_blocksize / m_options.BlockhashSize) * m_blocksize;
+ m_maxmetadatasize = (m_blocksize / (long)m_options.BlockhashSize) * m_blocksize;
m_blockbuffer = new byte[m_options.Blocksize * Math.Max(1, m_options.FileReadBufferSize / m_options.Blocksize)];
m_blocklistbuffer = new byte[m_options.Blocksize];
|