From d40eb87cc00f50a5debb8899eacb7fcf1065badf Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 12 Oct 2023 23:45:40 -0400 Subject: bfstd: Actually use the copied locale This fixes a segfault in xstrerror() when using musl. --- src/bfstd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bfstd.c') diff --git a/src/bfstd.c b/src/bfstd.c index e9214d4..a4ae439 100644 --- a/src/bfstd.c +++ b/src/bfstd.c @@ -301,7 +301,7 @@ const char *xstrerror(int errnum) { } if (copy != (locale_t)0) { - ret = strerror_l(errnum, loc); + ret = strerror_l(errnum, copy); } if (loc == LC_GLOBAL_LOCALE) { -- cgit v1.2.3