From a4bb297db7e0bb63d5be52b7dcf289e90e4d2585 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Thu, 13 Jul 2017 01:31:47 +0100 Subject: [PATCH] Improve the progress calculator for multithreaded progress. --- volatility/framework/interfaces/layers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/volatility/framework/interfaces/layers.py b/volatility/framework/interfaces/layers.py index 3d98c52ce..3c005e68d 100644 --- a/volatility/framework/interfaces/layers.py +++ b/volatility/framework/interfaces/layers.py @@ -214,7 +214,8 @@ class DataLayerInterface(configuration.ConfigurableInterface, validity.ValidityR def _scan_chunk(self, scanner, min_address, max_address, progress, iterator_value): length = min(scanner.chunk_size + scanner.overlap, max_address - iterator_value) chunk = self.read(iterator_value, length) - progress.value = iterator_value + # Don't include the overlaps, or we'll go over 100% + progress.value += min(scanner.chunk_size, max_address - iterator_value) return list(scanner(chunk, iterator_value)) def _scan_metric(self, _scanner, min_address, max_address, value):