From 1aad8cee6f7747bff58f8545fef3c4a8df5f7902 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 10 Feb 2016 13:11:35 +0100 Subject: Fix hang in bidi directinality detection code. --- source/html/html-layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/html') diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 0a6e9970..fdabe93b 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -1831,6 +1831,8 @@ detect_flow_directionality(fz_context *ctx, fz_pool *pool, uni_buf *buffer, fz_b break; } + end = end->next; + if (broken) break; @@ -1851,8 +1853,6 @@ detect_flow_directionality(fz_context *ctx, fz_pool *pool, uni_buf *buffer, fz_b text += fz_chartorune(&rune, text); buffer->data[buffer->len++] = rune; } - - end = end->next; } /* Detect directionality for the buffer */ -- cgit v1.2.3