From eb35ffb325bafc40320a871864fe3ac27b3c71b0 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 7 May 2013 23:43:09 +0100 Subject: [PATCH] Fix a typo in the size constraints on physical layers. --- volatility/framework/layers/physical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volatility/framework/layers/physical.py b/volatility/framework/layers/physical.py index 5b60fe2a4..2e5557ec7 100644 --- a/volatility/framework/layers/physical.py +++ b/volatility/framework/layers/physical.py @@ -65,7 +65,7 @@ class FileLayer(interfaces.layers.DataLayerInterface): """Reads from the file at offset for length""" if not self.is_valid(offset): raise exceptions.InvalidAddressException("Offset outside of the " + self.name + " file boundaries") - if not self.is_valid(offset + length): + if not self.is_valid(offset + (length - 1)): raise exceptions.InvalidAddressException("Final offset outside of the " + self.name + " file boundaries") if length < 0: raise TypeError("Length must be positive")