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
4a431afd
Commit
4a431afd
authored
Mar 27, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/profile: Add a few NULL checks (Coverity).
parent
0230695a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
profile.c
dlls/kernel32/profile.c
+14
-3
No files found.
dlls/kernel32/profile.c
View file @
4a431afd
...
...
@@ -1324,6 +1324,12 @@ INT WINAPI GetPrivateProfileSectionW( LPCWSTR section, LPWSTR buffer,
{
int
ret
=
0
;
if
(
!
section
||
!
buffer
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
TRACE
(
"(%s, %p, %d, %s)
\n
"
,
debugstr_w
(
section
),
buffer
,
len
,
debugstr_w
(
filename
));
RtlEnterCriticalSection
(
&
PROFILE_CritSect
);
...
...
@@ -1346,9 +1352,14 @@ INT WINAPI GetPrivateProfileSectionA( LPCSTR section, LPSTR buffer,
LPWSTR
bufferW
;
INT
retW
,
ret
=
0
;
bufferW
=
buffer
?
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))
:
NULL
;
if
(
section
)
RtlCreateUnicodeStringFromAsciiz
(
&
sectionW
,
section
);
else
sectionW
.
Buffer
=
NULL
;
if
(
!
section
||
!
buffer
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
bufferW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
RtlCreateUnicodeStringFromAsciiz
(
&
sectionW
,
section
);
if
(
filename
)
RtlCreateUnicodeStringFromAsciiz
(
&
filenameW
,
filename
);
else
filenameW
.
Buffer
=
NULL
;
...
...
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