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
9023f8f6
Commit
9023f8f6
authored
Jul 22, 2018
by
Nelson Elhage
Committed by
Patrick Steinhardt
Oct 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config_file: Don't crash on options without a section
(cherry picked from commit
c4d7fa95
)
parent
e1295400
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/config_file.c
+4
-0
No files found.
src/config_file.c
View file @
9023f8f6
...
...
@@ -1075,6 +1075,10 @@ static int read_on_variable(
GIT_UNUSED
(
line
);
GIT_UNUSED
(
line_len
);
if
(
!
current_section
)
{
giterr_set
(
GITERR_CONFIG
,
"no section for key: %s"
,
var_name
);
return
-
1
;
}
git__strtolower
(
var_name
);
git_buf_printf
(
&
buf
,
"%s.%s"
,
current_section
,
var_name
);
git__free
(
var_name
);
...
...
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