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
efe2ee56
Commit
efe2ee56
authored
Mar 02, 2007
by
Marcus Meissner
Committed by
Alexandre Julliard
Mar 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang/tests: Protect from 1 byte static buffer overflow.
parent
3f726d31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
mlang.c
dlls/mlang/tests/mlang.c
+5
-2
No files found.
dlls/mlang/tests/mlang.c
View file @
efe2ee56
...
...
@@ -86,8 +86,11 @@ static void test_multibyte_to_unicode_translations(IMultiLanguage2 *iML2)
ok
(
ret
==
S_OK
,
"IMultiLanguage2_ConvertStringToUnicode failed: %08x
\n
"
,
ret
);
ok
(
lenA
==
lstrlenA
(
stringA
),
"expected lenA %u, got %u
\n
"
,
lstrlenA
(
stringA
),
lenA
);
ok
(
lenW
==
lstrlenW
(
stringW
),
"expected lenW %u, got %u
\n
"
,
lstrlenW
(
stringW
),
lenW
);
ok
(
bufW
[
lenW
]
!=
0
,
"buf should not be 0 terminated
\n
"
);
bufW
[
lenW
]
=
0
;
/* -1 doesn't include 0 terminator */
if
(
lenW
<
sizeof
(
bufW
)
/
sizeof
(
bufW
[
0
]))
{
/* can only happen if the convert call fails */
ok
(
bufW
[
lenW
]
!=
0
,
"buf should not be 0 terminated
\n
"
);
bufW
[
lenW
]
=
0
;
/* -1 doesn't include 0 terminator */
}
ok
(
!
lstrcmpW
(
bufW
,
stringW
),
"bufW/stringW mismatch
\n
"
);
memset
(
bufW
,
'x'
,
sizeof
(
bufW
));
...
...
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