aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index faacdb238..6d09b7764 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -735,6 +735,10 @@ int getconfig(int argc, char **argv, or_options_t *options) {
log_fn(LOG_WARN, "Nickname '%s' contains illegal characters.", options->Nickname);
result = -1;
}
+ if (strlen(options->Nickname) == 0) {
+ log_fn(LOG_WARN, "Nickname must have at least one character");
+ result = -1;
+ }
if (strlen(options->Nickname) > MAX_NICKNAME_LEN) {
log_fn(LOG_WARN, "Nickname '%s' has more than %d characters.",
options->Nickname, MAX_NICKNAME_LEN);