From 52719912ba9b6c88a3ce7e5443c62c7cab16a367 Mon Sep 17 00:00:00 2001 From: hasherezade Date: Sun, 3 Nov 2024 14:03:27 -0800 Subject: [PATCH] [BUGFIX] Roundup module size to PAGE_SIZE --- scanners/module_data.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scanners/module_data.h b/scanners/module_data.h index bed7a21f5..7bbd712e1 100644 --- a/scanners/module_data.h +++ b/scanners/module_data.h @@ -171,7 +171,11 @@ namespace pesieve { if (imgBufferSize) { return imgBufferSize; } - return getHdrImageSize(); + size_t defined_size = getHdrImageSize(); + if (!defined_size) { + return 0; + } + return peconv::round_up_to_unit(defined_size, (size_t)PAGE_SIZE); } size_t getHeaderSize()