projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a07aa92
)
Don't use strlen() on a NULL pointer.
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 12 Nov 2010 10:38:05 +0000
(11:38 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 12 Nov 2010 10:38:05 +0000
(11:38 +0100)
A bug introduced in commit
667b1bac77b134cf32c98d5dc25619e8c3303f52
caused tinc
to crash on startup.
src/conf.c
patch
|
blob
|
history
diff --git
a/src/conf.c
b/src/conf.c
index 1b8213c4709aa76d891842420eb874c0db5a2f0b..0727953127e141ac633fc1e8e79bbaa911ab4b95 100644
(file)
--- a/
src/conf.c
+++ b/
src/conf.c
@@
-339,7
+339,7
@@
bool read_config_file(avl_tree_t *config_tree, const char *fname) {
void read_config_options(avl_tree_t *config_tree, const char *prefix) {
list_node_t *node, *next;
- size_t prefix_len =
strlen(prefix)
;
+ size_t prefix_len =
prefix ? strlen(prefix) : 0
;
for(node = cmdline_conf->tail; node; node = next) {
config_t *cfg = (config_t *)node->data;