Commit 37a5a0e7 authored by Trevor Spiteri's avatar Trevor Spiteri

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

https://bugzilla.redhat.com/show_bug.cgi?id=1575842

Reproduce using:
1. Select text tool (F8)
2. Click on empty canvas
3. Hit Enter
parent d4cc4608
......@@ -183,6 +183,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