Commit a609f16b authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Test for end() after lower_bound call before dereferencing!

--HG--
branch : RECOLL_1_21_MAINT
parent 7425162f
......@@ -142,6 +142,8 @@ static inline int whatcc(unsigned int c)
} else {
vector<unsigned int>::iterator it =
lower_bound(vpuncblocks.begin(), vpuncblocks.end(), c);
if (it == vpuncblocks.end())
return LETTER;
if (c == *it)
return SPACE;
if ((it - vpuncblocks.begin()) % 2 == 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment