From 47ed4eb33d11ff132d698decd24be4e16ff55c60 Mon Sep 17 00:00:00 2001 From: Dov Grobgeld Date: Wed, 21 Mar 2018 06:47:43 +0200 Subject: [PATCH] Fixed uninitialized memory access. Issue #58. --- lib/fribidi-char-sets-cap-rtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fribidi-char-sets-cap-rtl.c b/lib/fribidi-char-sets-cap-rtl.c index f471f79..b0c0e4a 100644 --- a/lib/fribidi-char-sets-cap-rtl.c +++ b/lib/fribidi-char-sets-cap-rtl.c @@ -123,7 +123,7 @@ init_cap_rtl ( for (j = 0; j < num_types; j++) if (to_type[j] == t) break; - if (!request[j]) /* Do not need this type */ + if (j >= num_types || !request[j]) /* Do not need this type */ continue; for (k = 0; k < CAPRTL_CHARS; k++) if (caprtl_to_unicode[k] == FRIBIDI_UNICODE_CHARS -- 2.40.0