After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 547303 - pango_layout_get_cursor_pos crashes on certain text buffers
pango_layout_get_cursor_pos crashes on certain text buffers
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2008-08-11 15:40 UTC by Øyvind Kolås (pippin)
Modified: 2008-08-11 18:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case causing pango to crash in pango_layout_get_cursor_position (976 bytes, text/plain)
2008-08-11 15:41 UTC, Øyvind Kolås (pippin)
Details

Description Øyvind Kolås (pippin) 2008-08-11 15:40:09 UTC
If a \r\n is present in a buffer passed to a PangoLayout pango will abort the process with an assert not reached for some positions in the buffer.

** Pango:ERROR:(/tmp/buildd/pango1.0-1.20.5/pango/pango-layout.c:2147):pango_layout_line_get_char_direction: code should not be reached
Comment 1 Øyvind Kolås (pippin) 2008-08-11 15:41:43 UTC
Created attachment 116356 [details]
Test case causing pango to crash in pango_layout_get_cursor_position

Minimal code snippet that causes pango to go boom.
Comment 2 Behdad Esfahbod 2008-08-11 18:17:17 UTC
2008-08-11  Behdad Esfahbod  <behdad@gnome.org>

        Bug 547303 – pango_layout_get_cursor_pos crashes on certain text
        buffers

        * pango/pango-layout.c (pango_layout_get_cursor_pos): Handle cursor
        position in the middle of a "\r\n" cluster.