From b87517759d75bb3bbaae2f2bc4099159c1b6fbdc Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 3 Feb 2019 18:23:22 +1100 Subject: [PATCH] io: don't forget to initialise the mmap size for zero length mappings --- io_posix.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/io_posix.cpp b/io_posix.cpp index eb8f1892..e9cec8a6 100644 --- a/io_posix.cpp +++ b/io_posix.cpp @@ -47,6 +47,7 @@ mapped_file::mapped_file (::cruft::posix::fd const &src, int const mflags) // accepted by some systems; like Linux) if (meta.st_size == 0) { m_data = nullptr; + m_size = 0; return; }