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 313857 - Make break.c safe against future line-break type additions in Unicode
Make break.c safe against future line-break type additions in Unicode
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.10.x
Other All
: High normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks: 313583
 
 
Reported: 2005-08-18 17:04 UTC by Behdad Esfahbod
Modified: 2005-08-26 18:54 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to fix (1.23 KB, patch)
2005-08-18 17:30 UTC, Behdad Esfahbod
accepted-commit_now Details | Review

Description Behdad Esfahbod 2005-08-18 17:04:29 UTC
in Unicode 4.1 five new catogeries are added to the line-breaking property of
characters.  This makes break.c unhappy with an updated glib:

Pango-ERROR **: file break.c: line 780 (pango_default_break): assertion failed:
(IN_BREAK_TABLE (break_type))
aborting...

This should not happen.
Comment 1 Behdad Esfahbod 2005-08-18 17:30:33 UTC
Created attachment 50932 [details] [review]
Patch to fix

The attached patch fixes the problem by replacing types that we don't know
about by G_UNICODE_BREAK_UNKNOWN.

It also fixes what I believe is a bug in:

  btype <= G_N_ELEMENTS(line_break_indexes)
Comment 2 Julien Gilli 2005-08-19 19:58:09 UTC
As bug #313583 says, i could reproduce the bug and apply the patch with success.
Comment 3 Behdad Esfahbod 2005-08-24 23:16:42 UTC
Owen, should I apply this to the branch too?
Comment 4 Owen Taylor 2005-08-25 20:17:06 UTC
Yes.
Comment 5 Behdad Esfahbod 2005-08-26 18:54:42 UTC
Committed to HEAD and pango-1-10.

2005-08-26  Behdad Esfahbod  <pango@behdad.org>

        * pango/break.c: Protect against future line-break type additions in
        glib Unicode module.