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
ca10760d
Commit
ca10760d
authored
May 09, 2022
by
Andrew Eikum
Committed by
Alexandre Julliard
May 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Allow NULL length pointer in IMFAttributes::GetAllocatedString.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d686663d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
main.c
dlls/mfplat/main.c
+2
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+5
-0
No files found.
dlls/mfplat/main.c
View file @
ca10760d
...
...
@@ -2670,7 +2670,8 @@ HRESULT attributes_GetAllocatedString(struct attributes *attributes, REFGUID key
if
(
SUCCEEDED
(
hr
))
{
*
value
=
attrval
.
pwszVal
;
*
length
=
lstrlenW
(
*
value
);
if
(
length
)
*
length
=
lstrlenW
(
*
value
);
}
return
hr
;
...
...
dlls/mfplat/tests/mfplat.c
View file @
ca10760d
...
...
@@ -1638,6 +1638,11 @@ static void test_attributes(void)
ok
(
hr
==
S_OK
,
"Failed to get string length, hr %#lx.
\n
"
,
hr
);
ok
(
string_length
==
lstrlenW
(
stringW
),
"Unexpected length %u.
\n
"
,
string_length
);
hr
=
IMFAttributes_GetAllocatedString
(
attributes
,
&
DUMMY_GUID1
,
&
string
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to get allocated string, hr %#lx.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
string
,
stringW
),
"Unexpected string %s.
\n
"
,
wine_dbgstr_w
(
string
));
CoTaskMemFree
(
string
);
string_length
=
0xdeadbeef
;
hr
=
IMFAttributes_GetAllocatedString
(
attributes
,
&
DUMMY_GUID1
,
&
string
,
&
string_length
);
ok
(
hr
==
S_OK
,
"Failed to get allocated string, hr %#lx.
\n
"
,
hr
);
...
...
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