From: Dov Grobgeld Date: Wed, 21 Mar 2018 04:47:43 +0000 (+0200) Subject: Fixed uninitialized memory access. Issue #58. X-Git-Tag: v1.0.3~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47ed4eb33d11ff132d698decd24be4e16ff55c60;p=fribidi Fixed uninitialized memory access. Issue #58. --- 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