comments-dialog: Avoid segfault in comments dialog pasting very long text. 20131008030504/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 8 Oct 2013 03:40:24 +0000 (20:40 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 8 Oct 2013 03:41:46 +0000 (20:41 -0700)
commitdf11254fddfd186f3d947c9891ab85eca20739ab
tree7ffcf259c4ef7cd841a64bcc1b74c0feac32190e
parentf5d62f6969bff30fbddfd1b64f5fe9bb40c0de2e
comments-dialog: Avoid segfault in comments dialog pasting very long text.

The code in wrap_line() used a GtkTextIter after an insertion invalidated
it.  In some setups, with a sufficiently long pasted text, this caused a
Gtk-WARNING and a subsequent segfault.  This commit fixes the problem by
removing the offending code.  In my testing, this didn't cause a UI
regression.

Reported by Bastián Díaz in the thread starting at
http://lists.gnu.org/archive/html/bug-gnu-pspp/2013-10/msg00005.html
src/ui/gui/comments-dialog.c