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
197c2409
Commit
197c2409
authored
May 22, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Workaround use after free warnings.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
c8d6f212
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
vartype.c
dlls/oleaut32/tests/vartype.c
+7
-4
No files found.
dlls/oleaut32/tests/vartype.c
View file @
197c2409
...
...
@@ -31,6 +31,8 @@
DEFINE_GUID
(
UUID_test_struct
,
0x4029f190
,
0xca4a
,
0x4611
,
0xae
,
0xb9
,
0x67
,
0x39
,
0x83
,
0xcb
,
0x96
,
0xdd
);
static
void
(
WINAPI
*
pSysFreeString
)(
BSTR
);
/* Some Visual C++ versions choke on __uint64 to float conversions.
* To fix this you need either VC++ 6.0 plus the processor pack
* or Visual C++ >=7.0.
...
...
@@ -5843,9 +5845,9 @@ static void test_bstr_cache(void)
str
=
SysAllocString
(
testW
);
/* This should put the string into cache */
SysFreeString
(
str
);
p
SysFreeString
(
str
);
/* The string is in cache, this won't touch it */
SysFreeString
(
str
);
p
SysFreeString
(
str
);
ok
(
SysStringLen
(
str
)
==
4
,
"unexpected len
\n
"
);
ok
(
!
lstrcmpW
(
str
,
testW
),
"string changed
\n
"
);
...
...
@@ -5874,8 +5876,8 @@ static void test_bstr_cache(void)
str2
=
SysAllocStringLen
(
NULL
,
16
);
ok
(
str2
==
strs
[
1
],
"str2 != strs[1]
\n
"
);
SysFreeString
(
str
);
SysFreeString
(
str2
);
p
SysFreeString
(
str
);
p
SysFreeString
(
str2
);
SysFreeString
(
str
);
SysFreeString
(
str2
);
}
...
...
@@ -6047,6 +6049,7 @@ static void test_recinfo(void)
START_TEST
(
vartype
)
{
hOleaut32
=
GetModuleHandleA
(
"oleaut32.dll"
);
pSysFreeString
=
(
void
*
)
GetProcAddress
(
hOleaut32
,
"SysFreeString"
);
has_i8
=
GetProcAddress
(
hOleaut32
,
"VarI8FromI1"
)
!=
NULL
;
has_locales
=
has_i8
&&
GetProcAddress
(
hOleaut32
,
"GetVarConversionLocaleSetting"
)
!=
NULL
;
...
...
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