mirror of
https://github.com/boostorg/algorithm.git
synced 2025-07-02 07:21:06 +02:00
out-of-range iterator access fix
[SVN r22493]
This commit is contained in:
@ -325,7 +325,7 @@ namespace boost {
|
||||
typedef ForwardIteratorT input_iterator_type;
|
||||
typedef iterator_range<ForwardIteratorT> result_type;
|
||||
|
||||
if ( (End<=Begin) || (End < (Begin+m_N) ) )
|
||||
if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < m_N ) )
|
||||
return result_type( Begin, End );
|
||||
|
||||
return result_type(Begin,Begin+m_N);
|
||||
@ -414,7 +414,7 @@ namespace boost {
|
||||
typedef ForwardIteratorT input_iterator_type;
|
||||
typedef iterator_range<ForwardIteratorT> result_type;
|
||||
|
||||
if ( (End<=Begin) || (End < (Begin+m_N) ) )
|
||||
if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < m_N ) )
|
||||
return result_type( Begin, End );
|
||||
|
||||
return result_type( End-m_N, End );
|
||||
|
Reference in New Issue
Block a user