Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion include/boost/btree/detail/index_bases.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,11 @@ class index_base : public Base, private noncopyable
friend class index_base;

index_iterator_type m_index_iterator;
file_type* m_file; // 0 for end iterator
// use original type "boost::btree::extendible_mapped_file"
// instead of typedef type "file_type" to avoid trouble
// with the i686-apple-darwin11-llvm-g++-4.2 (gcc)4.2.1 compiler
// file_type* m_file; // 0 for end iterator
boost::btree::extendible_mapped_file* m_file; // 0 for end iterator

Reference dereference() const
{
Expand Down
2 changes: 1 addition & 1 deletion src/detail/buffer_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void buffer_manager::data_size(data_size_type sz)
m_data_size = sz;
offset_type file_size = binary_file::seek(0, seekdir::end);
m_buffer_count = static_cast<buffer_count_type>(file_size / sz);
if (m_buffer_count * sz != file_size)
if (file_size < 0 || m_buffer_count * sz != (std::size_t)file_size)
BOOST_BUFFER_FILE_THROW(buffer_manager_error(
"buffer_manager_error: file size error; too large or not multiple of data size: ",
binary_file::path()));
Expand Down