logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

pango-CVE-2019-1010238.patch (1088B)


  1. From 490f8979a260c16b1df055eab386345da18a2d54 Mon Sep 17 00:00:00 2001
  2. From: Matthias Clasen <mclasen@redhat.com>
  3. Date: Wed, 10 Jul 2019 20:26:23 -0400
  4. Subject: [PATCH] bidi: Be safer against bad input
  5. Don't run off the end of an array that we
  6. allocated to certain length.
  7. Closes: https://gitlab.gnome.org/GNOME/pango/issues/342
  8. ---
  9. pango/pango-bidi-type.c | 7 +++++--
  10. 1 file changed, 5 insertions(+), 2 deletions(-)
  11. diff --git a/pango/pango-bidi-type.c b/pango/pango-bidi-type.c
  12. index 3e46b66c..5c02dbbb 100644
  13. --- a/pango/pango-bidi-type.c
  14. +++ b/pango/pango-bidi-type.c
  15. @@ -181,8 +181,11 @@ pango_log2vis_get_embedding_levels (const gchar *text,
  16. for (i = 0, p = text; p < text + length; p = g_utf8_next_char(p), i++)
  17. {
  18. gunichar ch = g_utf8_get_char (p);
  19. - FriBidiCharType char_type;
  20. - char_type = fribidi_get_bidi_type (ch);
  21. + FriBidiCharType char_type = fribidi_get_bidi_type (ch);
  22. +
  23. + if (i == n_chars)
  24. + break;
  25. +
  26. bidi_types[i] = char_type;
  27. ored_types |= char_type;
  28. if (FRIBIDI_IS_STRONG (char_type))
  29. --
  30. 2.21.0