From 3f43ea9abb24ed8d24d760989e1d87ea385f8eaa Mon Sep 17 00:00:00 2001 From: Mrmaxmeier <3913977+Mrmaxmeier@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:30:39 +0200 Subject: [PATCH] iconv/wctomb: fix memory corruption related to CURRENT_UTF8 implementation (#511) --- libc-top-half/musl/src/internal/locale_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc-top-half/musl/src/internal/locale_impl.h b/libc-top-half/musl/src/internal/locale_impl.h index 4649a43e0..88f5dcf8f 100644 --- a/libc-top-half/musl/src/internal/locale_impl.h +++ b/libc-top-half/musl/src/internal/locale_impl.h @@ -64,7 +64,7 @@ hidden char *__gettextdomain(void); &libc.current_locale; \ })) -#define CURRENT_UTF8 (!!libc.global_locale.cat[LC_CTYPE]) +#define CURRENT_UTF8 (!!CURRENT_LOCALE->cat[LC_CTYPE]) #endif #undef MB_CUR_MAX