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
1e3d65db
Commit
1e3d65db
authored
Dec 12, 2007
by
Aric Stewart
Committed by
Alexandre Julliard
Dec 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imagehlp: Improve last error handling in ImageGetCertificateData.
parent
7c3a7d8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
integrity.c
dlls/imagehlp/integrity.c
+12
-5
No files found.
dlls/imagehlp/integrity.c
View file @
1e3d65db
...
...
@@ -226,19 +226,25 @@ BOOL WINAPI ImageGetCertificateData(
TRACE
(
"%p %d %p %p
\n
"
,
handle
,
Index
,
Certificate
,
RequiredLength
);
if
(
!
RequiredLength
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
IMAGEHLP_GetCertificateOffset
(
handle
,
Index
,
&
ofs
,
&
size
)
)
return
FALSE
;
if
(
!
Certificat
e
)
if
(
*
RequiredLength
<
siz
e
)
{
*
RequiredLength
=
size
;
return
TRUE
;
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
if
(
*
RequiredLength
<
siz
e
)
if
(
!
Certificat
e
)
{
*
RequiredLength
=
size
;
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -255,6 +261,7 @@ BOOL WINAPI ImageGetCertificateData(
return
FALSE
;
TRACE
(
"OK
\n
"
);
SetLastError
(
NO_ERROR
);
return
TRUE
;
}
...
...
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