chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
afea26a
)
conf-parser: don't crash if an assignment is read before a section header
author
Lennart Poettering
<lennart@poettering.net>
Wed, 11 Aug 2010 23:01:30 +0000
(
01:01
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 11 Aug 2010 23:01:30 +0000
(
01:01
+0200)
src/conf-parser.c
patch
|
blob
|
history
diff --git
a/src/conf-parser.c
b/src/conf-parser.c
index 1cabc0d789b2d9ef17f9689490e81fb498f2e006..b439d0ce7cac23e8a3c2b7ff0e63820f0d827696 100644
(file)
--- a/
src/conf-parser.c
+++ b/
src/conf-parser.c
@@
-122,7
+122,7
@@
static int parse_line(const char *filename, unsigned line, char **section, const
return 0;
}
- if (sections &&
!strv_contains((char**) sections, *section
))
+ if (sections &&
(!*section || !strv_contains((char**) sections, *section)
))
return 0;
if (!(e = strchr(l, '='))) {