Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1b6eee30
Commit
1b6eee30
authored
Dec 04, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't depend on how __lc_time_data was allocated in _Gettnames.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9571b362
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
locale.c
dlls/msvcrt/locale.c
+5
-3
No files found.
dlls/msvcrt/locale.c
View file @
1b6eee30
...
...
@@ -604,7 +604,7 @@ MSVCRT_wchar_t* CDECL _W_Getmonths(void)
void
*
CDECL
_Gettnames
(
void
)
{
MSVCRT___lc_time_data
*
ret
,
*
cur
=
get_locinfo
()
->
lc_time_curr
;
unsigned
int
i
,
size
=
sizeof
(
MSVCRT___lc_time_data
);
unsigned
int
i
,
len
,
size
=
sizeof
(
MSVCRT___lc_time_data
);
TRACE
(
"
\n
"
);
...
...
@@ -614,12 +614,14 @@ void* CDECL _Gettnames(void)
ret
=
MSVCRT_malloc
(
size
);
if
(
!
ret
)
return
NULL
;
memcpy
(
ret
,
cur
,
size
);
memcpy
(
ret
,
cur
,
size
of
(
*
ret
)
);
size
=
0
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
cur
->
str
.
str
);
i
++
)
{
len
=
strlen
(
cur
->
str
.
str
[
i
])
+
1
;
memcpy
(
&
ret
->
data
[
size
],
cur
->
str
.
str
[
i
],
len
);
ret
->
str
.
str
[
i
]
=
&
ret
->
data
[
size
];
size
+=
strlen
(
&
ret
->
data
[
size
])
+
1
;
size
+=
len
;
}
return
ret
;
...
...
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