Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a2366c94
Commit
a2366c94
authored
Oct 27, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #467 from oleganza/oa-config-parse-fix
Fixed crash in config parser when empty value is encountered.
parents
d533c888
9f861826
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/config_file.c
+8
-2
No files found.
src/config_file.c
View file @
a2366c94
...
...
@@ -1158,19 +1158,25 @@ static int parse_variable(diskfile_backend *cfg, char **var_name, char **var_val
while
(
isspace
(
value_start
[
0
]))
value_start
++
;
if
(
value_start
[
0
]
==
'\0'
)
if
(
value_start
[
0
]
==
'\0'
)
{
*
var_value
=
NULL
;
goto
out
;
}
if
(
is_multiline_var
(
value_start
))
{
error
=
parse_multiline_variable
(
cfg
,
value_start
,
var_value
);
if
(
error
<
GIT_SUCCESS
)
if
(
error
!=
GIT_SUCCESS
)
{
*
var_value
=
NULL
;
free
(
*
var_name
);
}
goto
out
;
}
tmp
=
strdup
(
value_start
);
if
(
tmp
==
NULL
)
{
free
(
*
var_name
);
*
var_value
=
NULL
;
error
=
GIT_ENOMEM
;
goto
out
;
}
...
...
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