From 17248ab6fea92ab4e4011954fbe9ab88b37c0416 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Fri, 31 Jul 2020 00:13:15 +0200 Subject: [PATCH] AK: On failed mmap, don't claim that there's a readable page --- AK/MappedFile.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AK/MappedFile.cpp b/AK/MappedFile.cpp index d3783a7fd6..3f3afb8691 100644 --- a/AK/MappedFile.cpp +++ b/AK/MappedFile.cpp @@ -24,8 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include +#include #include #include #include @@ -38,7 +38,6 @@ namespace AK { MappedFile::MappedFile(const StringView& file_name) { - m_size = PAGE_SIZE; int fd = open_with_path_length(file_name.characters_without_null_termination(), file_name.length(), O_RDONLY | O_CLOEXEC, 0); if (fd == -1) {