summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorWeng Xuetian <xweng@google.com>2021-01-14 20:37:05 -0800
committerWeng Xuetian <wengxt@gmail.com>2021-01-14 20:42:36 -0800
commit0a816b491b3eac8ca7d285857bd57efa3658d7ae (patch)
treeaa2a31ca18879c68e14d3f182c6fef7e60f2bca1 /pango
parentbd88b04815d097678fc5954a6a429433b59e768e (diff)
downloadpango-0a816b491b3eac8ca7d285857bd57efa3658d7ae.tar.gz
Fix the length checking
Closes #526
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-context.c2
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,