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
1517342f
Commit
1517342f
authored
Jul 11, 2023
by
Jeff Smith
Committed by
Alexandre Julliard
Jul 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix GdipGetPropertySize return value when no properties exist.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54748
parent
d84210f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
image.c
dlls/gdiplus/image.c
+6
-1
image.c
dlls/gdiplus/tests/image.c
+12
-16
No files found.
dlls/gdiplus/image.c
View file @
1517342f
...
...
@@ -2760,7 +2760,12 @@ GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT *size, UINT *count)
}
reader
=
((
GpBitmap
*
)
image
)
->
metadata_reader
;
if
(
!
reader
)
return
PropertyNotFound
;
if
(
!
reader
)
{
*
count
=
0
;
*
size
=
0
;
return
Ok
;
}
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
prop_count
);
if
(
FAILED
(
hr
))
return
hresult_to_status
(
hr
);
...
...
dlls/gdiplus/tests/image.c
View file @
1517342f
...
...
@@ -3804,6 +3804,18 @@ static void test_image_properties(void)
"expected property id %#lx, got %#lx
\n
"
,
prop_id
[
0
],
item
.
data
.
id
);
}
status
=
GdipGetPropertySize
(
NULL
,
&
prop_size
,
&
prop_count
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
&
prop_size
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
NULL
,
&
prop_count
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
expected
=
(
image_type
==
ImageTypeMetafile
)
?
NotImplemented
:
Ok
;
status
=
GdipGetPropertySize
(
image
,
&
prop_size
,
&
prop_count
);
expect
(
expected
,
status
);
GdipDisposeImage
(
image
);
winetest_pop_context
();
...
...
@@ -4154,14 +4166,6 @@ static void test_GdipGetAllPropertyItems(void)
HeapFree
(
GetProcessHeap
(),
0
,
prop_id
);
status
=
GdipGetPropertySize
(
NULL
,
&
total_size
,
&
total_count
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
&
total_size
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
NULL
,
&
total_count
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
total_size
=
0xdeadbeef
;
total_count
=
0xdeadbeef
;
status
=
GdipGetPropertySize
(
image
,
&
total_size
,
&
total_count
);
...
...
@@ -4918,14 +4922,6 @@ static void test_gif_properties(void)
HeapFree
(
GetProcessHeap
(),
0
,
prop_id
);
status
=
GdipGetPropertySize
(
NULL
,
&
total_size
,
&
total_count
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
&
total_size
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
NULL
,
&
total_count
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertySize
(
image
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
total_size
=
0xdeadbeef
;
total_count
=
0xdeadbeef
;
status
=
GdipGetPropertySize
(
image
,
&
total_size
,
&
total_count
);
...
...
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