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
106b9001
Commit
106b9001
authored
Aug 17, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms/tests: Allocate the profile buffer dynamically to make sure it's large enough.
parent
33e1b6ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
profile.c
dlls/mscms/tests/profile.c
+21
-9
No files found.
dlls/mscms/tests/profile.c
View file @
106b9001
...
...
@@ -760,13 +760,12 @@ static void test_GetStandardColorSpaceProfileW(void)
static
void
test_EnumColorProfilesA
(
void
)
{
BOOL
ret
;
DWORD
size
,
number
;
DWORD
total
,
size
,
number
;
ENUMTYPEA
record
;
BYTE
buffer
[
MAX_PATH
]
;
BYTE
*
buffer
;
/* Parameter checks */
size
=
sizeof
(
buffer
);
memset
(
&
record
,
0
,
sizeof
(
ENUMTYPEA
)
);
record
.
dwSize
=
sizeof
(
ENUMTYPEA
);
...
...
@@ -774,6 +773,12 @@ static void test_EnumColorProfilesA(void)
record
.
dwFields
|=
ET_DATACOLORSPACE
;
record
.
dwDataColorSpace
=
SPACE_RGB
;
total
=
0
;
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
NULL
,
&
total
,
&
number
);
ok
(
!
ret
,
"EnumColorProfilesA() failed (%d)
\n
"
,
GetLastError
()
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
);
size
=
total
;
ret
=
pEnumColorProfilesA
(
machine
,
&
record
,
buffer
,
&
size
,
&
number
);
ok
(
!
ret
,
"EnumColorProfilesA() succeeded (%d)
\n
"
,
GetLastError
()
);
...
...
@@ -798,23 +803,23 @@ static void test_EnumColorProfilesA(void)
if
(
standardprofile
)
{
size
=
sizeof
(
buffer
)
;
size
=
total
;
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ok
(
ret
,
"EnumColorProfilesA() failed (%d)
\n
"
,
GetLastError
()
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
static
void
test_EnumColorProfilesW
(
void
)
{
BOOL
ret
;
DWORD
size
,
number
;
DWORD
total
,
size
,
number
;
ENUMTYPEW
record
;
BYTE
buffer
[
MAX_PATH
*
sizeof
(
WCHAR
)]
;
BYTE
*
buffer
;
/* Parameter checks */
size
=
sizeof
(
buffer
);
memset
(
&
record
,
0
,
sizeof
(
ENUMTYPEW
)
);
record
.
dwSize
=
sizeof
(
ENUMTYPEW
);
...
...
@@ -822,6 +827,12 @@ static void test_EnumColorProfilesW(void)
record
.
dwFields
|=
ET_DATACOLORSPACE
;
record
.
dwDataColorSpace
=
SPACE_RGB
;
total
=
0
;
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
NULL
,
&
total
,
&
number
);
ok
(
!
ret
,
"EnumColorProfilesW() failed (%d)
\n
"
,
GetLastError
()
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
WCHAR
)
);
size
=
total
;
ret
=
pEnumColorProfilesW
(
machineW
,
&
record
,
buffer
,
&
size
,
&
number
);
ok
(
!
ret
,
"EnumColorProfilesW() succeeded (%d)
\n
"
,
GetLastError
()
);
...
...
@@ -833,7 +844,7 @@ static void test_EnumColorProfilesW(void)
if
(
standardprofileW
)
{
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
NULL
);
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ok
(
ret
,
"EnumColorProfilesW() failed (%d)
\n
"
,
GetLastError
()
);
}
...
...
@@ -846,11 +857,12 @@ static void test_EnumColorProfilesW(void)
if
(
standardprofileW
)
{
size
=
sizeof
(
buffer
)
;
size
=
total
;
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ok
(
ret
,
"EnumColorProfilesW() failed (%d)
\n
"
,
GetLastError
()
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
static
void
test_InstallColorProfileA
(
void
)
...
...
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