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
ee849808
Commit
ee849808
authored
Aug 06, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Check the return value of a couple of liblcms2 calls.
parent
47a3719f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
profile.c
dlls/mscms/profile.c
+12
-3
transform.c
dlls/mscms/transform.c
+18
-4
No files found.
dlls/mscms/profile.c
View file @
ee849808
...
...
@@ -1152,7 +1152,7 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE handle, TAGTYPE type, PBOOL prese
release_profile
(
profile
);
return
FALSE
;
}
*
present
=
cmsIsTag
(
profile
->
cmsprofile
,
type
);
*
present
=
(
cmsIsTag
(
profile
->
cmsprofile
,
type
)
!=
0
);
release_profile
(
profile
);
ret
=
TRUE
;
...
...
@@ -1406,7 +1406,11 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
profile
->
cbDataSize
)))
return
NULL
;
memcpy
(
data
,
profile
->
pProfileData
,
profile
->
cbDataSize
);
cmsprofile
=
cmsOpenProfileFromMem
(
data
,
profile
->
cbDataSize
);
if
(
!
(
cmsprofile
=
cmsOpenProfileFromMem
(
data
,
profile
->
cbDataSize
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
FALSE
;
}
size
=
profile
->
cbDataSize
;
}
else
if
(
profile
->
dwType
==
PROFILE_FILENAME
)
...
...
@@ -1464,7 +1468,12 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
NULL
;
}
cmsprofile
=
cmsOpenProfileFromMem
(
data
,
size
);
if
(
!
(
cmsprofile
=
cmsOpenProfileFromMem
(
data
,
size
)))
{
CloseHandle
(
handle
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
NULL
;
}
}
else
{
...
...
dlls/mscms/transform.c
View file @
ee849808
...
...
@@ -175,6 +175,12 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
cmsoutput
=
dst
->
cmsprofile
;
transform
.
cmstransform
=
cmsCreateProofingTransform
(
cmsinput
,
in_format
,
cmsoutput
,
out_format
,
cmstarget
,
intent
,
INTENT_ABSOLUTE_COLORIMETRIC
,
proofing
);
if
(
!
transform
.
cmstransform
)
{
if
(
tgt
)
release_profile
(
tgt
);
release_profile
(
dst
);
return
FALSE
;
}
ret
=
create_transform
(
&
transform
);
...
...
@@ -254,9 +260,15 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil
{
cmsprofiles
[
1
]
=
profile1
->
cmsprofile
;
}
transform
.
cmstransform
=
cmsCreateMultiprofileTransform
(
cmsprofiles
,
nprofiles
,
in_format
,
out_format
,
*
intents
,
0
);
transform
.
cmstransform
=
cmsCreateMultiprofileTransform
(
cmsprofiles
,
nprofiles
,
in_format
,
out_format
,
*
intents
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
cmsprofiles
);
if
(
!
transform
.
cmstransform
)
{
release_profile
(
profile0
);
release_profile
(
profile1
);
return
FALSE
;
}
ret
=
create_transform
(
&
transform
);
}
...
...
@@ -327,7 +339,8 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM handle, PVOID srcbits, BMFORMAT inpu
outputstride
,
callback
,
data
);
if
(
!
transform
)
return
FALSE
;
cmsChangeBuffersFormat
(
transform
->
cmstransform
,
from_bmformat
(
input
),
from_bmformat
(
output
)
);
if
(
!
cmsChangeBuffersFormat
(
transform
->
cmstransform
,
from_bmformat
(
input
),
from_bmformat
(
output
)
))
return
FALSE
;
cmsDoTransform
(
transform
->
cmstransform
,
srcbits
,
destbits
,
width
*
height
);
release_transform
(
transform
);
...
...
@@ -368,7 +381,8 @@ BOOL WINAPI TranslateColors( HTRANSFORM handle, PCOLOR in, DWORD count,
if
(
!
transform
)
return
FALSE
;
xfrm
=
transform
->
cmstransform
;
cmsChangeBuffersFormat
(
xfrm
,
from_type
(
input_type
),
from_type
(
output_type
)
);
if
(
!
cmsChangeBuffersFormat
(
xfrm
,
from_type
(
input_type
),
from_type
(
output_type
)
))
return
FALSE
;
switch
(
input_type
)
{
...
...
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