]> granicus.if.org Git - fribidi/commitdiff
Fixed uninitialized memory access. Issue #58.
authorDov Grobgeld <dov.grobgeld@gmail.com>
Wed, 21 Mar 2018 04:47:43 +0000 (06:47 +0200)
committerDov Grobgeld <dov.grobgeld@gmail.com>
Wed, 21 Mar 2018 04:47:43 +0000 (06:47 +0200)
lib/fribidi-char-sets-cap-rtl.c

index f471f792cbb4abd7ebb3f3921a95ccb42a147afb..b0c0e4aee253565421ca33346231ab7af13d3388 100644 (file)
@@ -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