Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
0f52459b
Commit
0f52459b
authored
Sep 06, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: FromLocale/ToLocale: fix stack underflow on very long strings
parent
c0bbe73c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/text/unicode.c
src/text/unicode.c
+7
-6
No files found.
src/text/unicode.c
View file @
0f52459b
...
...
@@ -118,17 +118,18 @@ static char *locale_fast (const char *string, bool from)
len
=
1
+
MultiByteToWideChar
(
from
?
CP_ACP
:
CP_UTF8
,
0
,
string
,
-
1
,
NULL
,
0
);
wchar_t
wide
[
len
];
wchar_t
*
wide
=
malloc
(
len
*
sizeof
(
wchar_t
));
if
(
wide
==
NULL
)
return
NULL
;
MultiByteToWideChar
(
from
?
CP_ACP
:
CP_UTF8
,
0
,
string
,
-
1
,
wide
,
len
);
len
=
1
+
WideCharToMultiByte
(
from
?
CP_UTF8
:
CP_ACP
,
0
,
wide
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
out
=
malloc
(
len
);
if
(
out
==
NULL
)
return
NULL
;
WideCharToMultiByte
(
from
?
CP_UTF8
:
CP_ACP
,
0
,
wide
,
-
1
,
out
,
len
,
NULL
,
NULL
);
if
(
out
!=
NULL
)
WideCharToMultiByte
(
from
?
CP_UTF8
:
CP_ACP
,
0
,
wide
,
-
1
,
out
,
len
,
NULL
,
NULL
);
free
(
wide
);
return
out
;
#else
(
void
)
from
;
...
...
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