Commit 0893793f authored by Nick Mathewson's avatar Nick Mathewson 🦞
Browse files

Merge remote branch 'origin/maint-0.2.2'

parents 0bd884cd c0f1517d
Loading
Loading
Loading
Loading

changes/bug2235

0 → 100644
+3 −0
Original line number Diff line number Diff line
  o Minor bugfixes
    - Avoid crashes when AccountingMax is set on clients.  Fixes bug 2235;
      Bugfix on 0.2.2.18-alpha.  Diagnosed by boboper.
+13 −8
Original line number Diff line number Diff line
@@ -529,7 +529,9 @@ accounting_set_wakeup_time(void)
    }
  }

  if (server_identity_key_is_set()) {
    format_iso_time(buf, interval_start_time);

    crypto_pk_get_digest(get_server_identity_key(), digest);

    d_env = crypto_new_digest_env();
@@ -537,6 +539,9 @@ accounting_set_wakeup_time(void)
    crypto_digest_add_bytes(d_env, digest, DIGEST_LEN);
    crypto_digest_get_digest(d_env, digest, DIGEST_LEN);
    crypto_free_digest_env(d_env);
  } else {
    crypto_rand(digest, DIGEST_LEN);
  }

  if (!expected_bandwidth_usage) {
    char buf1[ISO_TIME_LEN+1];