ソースを参照

unix: Fix infinite looping in SDL_FriBidi_Process if len > 127

start/end should be FriBidiStrIndex here -- using FriBidiLevel makes
them `signed char` and the loop here will become infinite if `end` is
> 127.

(cherry picked from commit 0ffb0bdd87499af6472a20c80728467d11c5826f)
John Schoenick 2 日 前
コミット
b8547af466
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/core/unix/SDL_fribidi.c

+ 2 - 2
src/core/unix/SDL_fribidi.c

@@ -84,8 +84,8 @@ char *SDL_FriBidi_Process(SDL_FriBidi *fribidi, char *utf8, ssize_t utf8_len, bo
     char *result;
     FriBidiStrIndex len;
     FriBidiLevel max_level;
-    FriBidiLevel start;
-    FriBidiLevel end;
+    FriBidiStrIndex start;
+    FriBidiStrIndex end;
     FriBidiParType direction;
     FriBidiParType str_direction;
     unsigned int i;