Ticket #18263: patch.diff

File patch.diff, 799 bytes (added by icanhasaccount, 4 years ago)
  • src/or/control.c

    diff --git a/src/or/control.c b/src/or/control.c
    index 2bec8f9..431b3a4 100644
    a b handle_control_getconf(control_connection_t *conn, uint32_t body_len, 
    10121012
    10131013      while (answer) {
    10141014        config_line_t *next;
    1015         smartlist_add_asprintf(answers, "250-%s=%s\r\n",
    1016                      answer->key, answer->value);
     1015        /* for some answer keys, answer->value can have zero length */
     1016        if (strlen(answer->value) == 0) {
     1017          smartlist_add_asprintf(answers, "250-%s\r\n",
     1018                       answer->key);
     1019        } else {
     1020          smartlist_add_asprintf(answers, "250-%s=%s\r\n",
     1021                       answer->key, answer->value);
     1022        }
    10171023
    10181024        next = answer->next;
    10191025        tor_free(answer->key);