summaryrefslogtreecommitdiff
path: root/src/analysis/contents
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/contents')
-rw-r--r--src/analysis/contents/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analysis/contents/file.c b/src/analysis/contents/file.c
index b6cd39c..8b371ab 100644
--- a/src/analysis/contents/file.c
+++ b/src/analysis/contents/file.c
@@ -510,10 +510,10 @@ static bool g_file_content_seek(const GFileContent *content, vmpa2t *addr, phys_
offset = get_phy_addr(addr);
- if (offset == VMPA_NO_PHYSICAL)
+ if (length > get_mrange_length(&content->range))
return false;
- if ((offset + length) > get_mrange_length(&content->range))
+ if (offset > (get_mrange_length(&content->range) - length))
return false;
advance_vmpa(addr, length);