Skip to content

Commit 4dd1f9a

Browse files
committed
Bugfix: Avoid integer overflow in o5m parser
See #329
1 parent c236ceb commit 4dd1f9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/osmium/io/detail/o5m_input_format.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ namespace osmium {
166166
}
167167

168168
bool ensure_bytes_available(std::size_t need_bytes) {
169-
if ((m_end - m_data) >= static_cast<int64_t>(need_bytes)) {
169+
if (static_cast<std::size_t>(m_end - m_data) >= need_bytes) {
170170
return true;
171171
}
172172

0 commit comments

Comments
 (0)