Skip to content

Commit

Permalink
fix segfault when config file is empty and connecting without password
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbaseman committed Dec 13, 2019
1 parent 969e78d commit 448c21d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ int main(int argc, char **argv)
log_debug("Config username = \"%s\"\n", cfg.username);
if (cfg.password != NULL)
log_debug_all("Config password = \"%s\"\n", cfg.password);
else
cfg.password = strdup("");
if (cfg.otp[0] != '\0')
log_debug("One-time password = \"%s\"\n", cfg.otp);

Expand Down

0 comments on commit 448c21d

Please sign in to comment.