mirror of
https://github.com/fltk/fltk.git
synced 2026-08-17 08:32:21 +08:00
Remove possible pointer underflow in fl_utf8_previous_composed_char (#1542)
Build and Test / build-linux (push) Canceled after 0s
Build and Test / build-wayland (push) Canceled after 0s
Build and Test / build-wayland-arm64 (push) Canceled after 0s
Build and Test / build-macos (push) Canceled after 0s
Build and Test / build-windows (push) Canceled after 0s
Build and Test / build-windows-arm (push) Canceled after 0s
Build and Test / build-linux (push) Canceled after 0s
Build and Test / build-wayland (push) Canceled after 0s
Build and Test / build-wayland-arm64 (push) Canceled after 0s
Build and Test / build-macos (push) Canceled after 0s
Build and Test / build-windows (push) Canceled after 0s
Build and Test / build-windows-arm (push) Canceled after 0s
This commit is contained in:
@@ -1755,6 +1755,7 @@ const char *fl_utf8_previous_composed_char(const char *from, const char *begin)
|
||||
keep = fl_utf8back(from - 1, begin, NULL);
|
||||
u = fl_utf8decode(keep, from, NULL);
|
||||
if (u == 0x200D) { // zero-width joiner
|
||||
if (keep <= begin) return begin;
|
||||
from = fl_utf8back(keep - 1, begin, NULL);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user