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
fdc78a3e
Commit
fdc78a3e
authored
Dec 19, 2000
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Dec 19, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect against NULL buffer in the profile functions.
parent
4e62b9df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
profile.c
files/profile.c
+9
-0
No files found.
files/profile.c
View file @
fdc78a3e
...
...
@@ -96,6 +96,8 @@ static void PROFILE_CopyEntry( char *buffer, const char *value, int len,
char
quote
=
'\0'
;
const
char
*
p
;
if
(
!
buffer
)
return
;
if
((
*
value
==
'\''
)
||
(
*
value
==
'\"'
))
{
if
(
value
[
1
]
&&
(
value
[
strlen
(
value
)
-
1
]
==
*
value
))
quote
=
*
value
++
;
...
...
@@ -761,6 +763,9 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
BOOL
return_values
)
{
PROFILEKEY
*
key
;
if
(
!
buffer
)
return
0
;
while
(
section
)
{
if
(
section
->
name
&&
!
strcasecmp
(
section
->
name
,
section_name
))
...
...
@@ -808,6 +813,8 @@ static INT PROFILE_GetSectionNames( LPSTR buffer, UINT len )
WORD
l
,
cursize
=
0
;
PROFILESECTION
*
section
;
if
(
!
buffer
)
return
0
;
for
(
section
=
CurProfile
->
section
;
section
;
section
=
section
->
next
)
if
(
section
->
name
)
{
l
=
strlen
(
section
->
name
);
...
...
@@ -852,6 +859,8 @@ static INT PROFILE_GetString( LPCSTR section, LPCSTR key_name,
{
PROFILEKEY
*
key
=
NULL
;
if
(
!
buffer
)
return
0
;
if
(
!
def_val
)
def_val
=
""
;
if
(
key_name
&&
key_name
[
0
])
{
...
...
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