Commit 957032e1 authored by Trevor Spiteri's avatar Trevor Spiteri Committed by Nathan Lee

out-of-bounds access on Enter in new text field

Reproduce using:
1. Select text tool (F8)
2. Click on empty canvas
3. Hit Enter

Backport from 1.0alpha master
Cherry picked from 37a5a0e7
parent e4480c55
......@@ -182,6 +182,8 @@ Layout::iterator Layout::sourceToIterator(void *source_cookie /*, Glib::ustring:
if (_input_stream[source_index]->Type() != TEXT_SOURCE)
return iterator(this, char_index);
if (char_index >= _characters.size())
return end();
return iterator(this, char_index);
/* This code was never used, the text_iterator argument was "NULL" in all calling code
InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(_input_stream[source_index]);
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