projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7303b51
)
Fix crash when no netname is specified.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 21 Jul 2012 13:51:15 +0000
(15:51 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 21 Jul 2012 13:51:15 +0000
(15:51 +0200)
src/tincctl.c
patch
|
blob
|
history
src/tincd.c
patch
|
blob
|
history
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
24359ab
..
ca354bc
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-192,7
+192,7
@@
static bool parse_options(int argc, char **argv) {
/* netname "." is special: a "top-level name" */
- if(!strcmp(netname, ".")) {
+ if(
netname &&
!strcmp(netname, ".")) {
free(netname);
netname = NULL;
}
diff --git
a/src/tincd.c
b/src/tincd.c
index
85aee39
..
9879ecb
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-231,7
+231,7
@@
static bool parse_options(int argc, char **argv) {
/* netname "." is special: a "top-level name" */
- if(!strcmp(netname, ".")) {
+ if(
netname &&
!strcmp(netname, ".")) {
free(netname);
netname = NULL;
}