diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-21 19:51:02 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-21 19:51:02 +0000 |
commit | 30748213af2bdc373aab076927a7c73ec314b776 (patch) | |
tree | 12e56ca20c02de9ab40a3dc39163b1f5016f1127 /pango | |
parent | 59074f13f87f09f493b0534da302f915a3f67a8f (diff) | |
parent | 0a816b491b3eac8ca7d285857bd57efa3658d7ae (diff) | |
download | pango-30748213af2bdc373aab076927a7c73ec314b776.tar.gz |
Merge branch 'fix' into 'master'
Fix the length checking
Closes #526
See merge request GNOME/pango!273
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c index 1fcdf366..a3d7e6c4 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1572,7 +1572,7 @@ pango_itemize_with_base_dir (PangoContext *context, g_return_val_if_fail (length >= 0, NULL); g_return_val_if_fail (length == 0 || text != NULL, NULL); - if (length == 0 || g_utf8_strlen (text, length) == 0) + if (length == 0 || g_utf8_strlen (text + start_index, length) == 0) return NULL; itemize_state_init (&state, context, text, base_dir, start_index, length, |