chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] more config file parsing robustness
[elogind.git]
/
namedev.c
diff --git
a/namedev.c
b/namedev.c
index 83852f9df29abc52e9cac65140f353b750881b0a..391da7efcacc59f053a1e5f737efefe2d03e74ad 100644
(file)
--- a/
namedev.c
+++ b/
namedev.c
@@
-464,6
+464,10
@@
static int namedev_init_permissions(void)
}
strncpy(dev.group, temp2, sizeof(dev.owner));
+ if (!temp) {
+ dbg("cannot parse line: %s", line);
+ continue;
+ }
dev.mode = strtol(temp, NULL, 8);
dbg_parse("name='%s', owner='%s', group='%s', mode=%#o",