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
84559266
Commit
84559266
authored
Nov 18, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: locinfo->lc_name should be guarded by lc_category->wrefcount.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3ecede0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
locale.c
dlls/msvcrt/locale.c
+6
-0
No files found.
dlls/msvcrt/locale.c
View file @
84559266
...
...
@@ -407,6 +407,11 @@ static inline BOOL set_lc_locale_name(MSVCRT_pthreadlocinfo locinfo, int cat)
WCHAR
buf
[
100
];
int
len
;
locinfo
->
lc_category
[
cat
].
wrefcount
=
MSVCRT_malloc
(
sizeof
(
int
));
if
(
!
locinfo
->
lc_category
[
cat
].
wrefcount
)
return
FALSE
;
*
locinfo
->
lc_category
[
cat
].
wrefcount
=
1
;
len
=
GetLocaleInfoW
(
lcid
,
LOCALE_SISO639LANGNAME
|
LOCALE_NOUSEROVERRIDE
,
buf
,
100
);
if
(
!
len
)
return
FALSE
;
...
...
@@ -931,6 +936,7 @@ void free_locinfo(MSVCRT_pthreadlocinfo locinfo)
for
(
i
=
MSVCRT_LC_MIN
+
1
;
i
<=
MSVCRT_LC_MAX
;
i
++
)
{
MSVCRT_free
(
locinfo
->
lc_category
[
i
].
locale
);
MSVCRT_free
(
locinfo
->
lc_category
[
i
].
refcount
);
MSVCRT_free
(
locinfo
->
lc_category
[
i
].
wrefcount
);
#if _MSVCR_VER >= 110
MSVCRT_free
(
locinfo
->
lc_name
[
i
]);
#endif
...
...
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