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
29bdb325
Commit
29bdb325
authored
Jul 18, 2009
by
Marcus Meissner
Committed by
Alexandre Julliard
Jul 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmc: Duplicate wine_cp_wcstombs check here too (Coverity).
parent
0f6591af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
write.c
tools/wmc/write.c
+7
-2
No files found.
tools/wmc/write.c
View file @
29bdb325
...
...
@@ -396,8 +396,13 @@ static char *make_string(WCHAR *uc, int len, int codepage)
else
mlen
=
wine_utf8_wcstombs
(
0
,
uc
,
unistrlen
(
uc
)
+
1
,
NULL
,
0
);
cc
=
tmp
=
xmalloc
(
mlen
);
if
((
i
=
wine_cp_wcstombs
(
cpdef
,
0
,
uc
,
unistrlen
(
uc
)
+
1
,
tmp
,
mlen
,
NULL
,
NULL
))
<
0
)
internal_error
(
__FILE__
,
__LINE__
,
"Buffer overflow? code %d
\n
"
,
i
);
if
(
cpdef
)
{
if
((
i
=
wine_cp_wcstombs
(
cpdef
,
0
,
uc
,
unistrlen
(
uc
)
+
1
,
tmp
,
mlen
,
NULL
,
NULL
))
<
0
)
internal_error
(
__FILE__
,
__LINE__
,
"Buffer overflow? code %d
\n
"
,
i
);
}
else
{
if
((
i
=
wine_utf8_wcstombs
(
0
,
uc
,
unistrlen
(
uc
)
+
1
,
tmp
,
mlen
))
<
0
)
internal_error
(
__FILE__
,
__LINE__
,
"Buffer overflow? code %d
\n
"
,
i
);
}
*
cptr
++
=
' '
;
*
cptr
++
=
'"'
;
for
(
i
=
b
=
0
;
i
<
len
;
i
++
,
cc
++
)
...
...
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