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:
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 24359ab7cc2d467ea3f97137c449ef7760cb7fe6..ca354bc08957a39296f7a80c6bae7667978f8a4e 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 85aee39f2172ac1072edf1f6d2c85ab876bf30f5..9879ecb6c6dfe6a63c2e07396ddb1f2f810293bd 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;
}