diff --git a/src/history_file.cpp b/src/history_file.cpp index 711e66825..beb849a05 100644 --- a/src/history_file.cpp +++ b/src/history_file.cpp @@ -157,7 +157,7 @@ bool history_file_contents_t::infer_file_type() { std::unique_ptr history_file_contents_t::create(int fd) { // Check that the file is seekable, and its size. off_t len = lseek(fd, 0, SEEK_END); - if (len <= 0 || static_cast(len) >= SIZE_MAX) return nullptr; + if (len <= 0) return nullptr; bool mmap_file_directly = should_mmap(); std::unique_ptr region =