Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
3481d165
Commit
3481d165
authored
Dec 08, 2023
by
Bernhard Übelacker
Committed by
Alexandre Julliard
Jan 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Protect setlocale against concurrent accesses.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55467
parent
bed2495e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
locale.c
dlls/msvcrt/locale.c
+5
-0
No files found.
dlls/msvcrt/locale.c
View file @
3481d165
...
...
@@ -2036,6 +2036,7 @@ char* CDECL setlocale(int category, const char* locale)
{
thread_data_t
*
data
=
msvcrt_get_thread_data
();
pthreadlocinfo
locinfo
=
get_locinfo
(),
newlocinfo
;
int
locale_flags
;
if
(
category
<
LC_MIN
||
category
>
LC_MAX
)
return
NULL
;
...
...
@@ -2047,7 +2048,11 @@ char* CDECL setlocale(int category, const char* locale)
return
locinfo
->
lc_category
[
category
].
locale
;
}
/* Make sure that locinfo is not updated by e.g. stricmp function */
locale_flags
=
data
->
locale_flags
;
data
->
locale_flags
|=
LOCALE_THREAD
;
newlocinfo
=
create_locinfo
(
category
,
locale
,
locinfo
);
data
->
locale_flags
=
locale_flags
;
if
(
!
newlocinfo
)
{
WARN
(
"%d %s failed
\n
"
,
category
,
locale
);
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment