1. 28 Oct, 2020 2 commits
    • Nick Mathewson's avatar
      Revise fix for bug 32178 (spaces at end of log msg). · 51182252
      Nick Mathewson authored
      The loop in the earlier patch would invoke undefined behavior in two
      ways: First, it would check whether it was looking at a space before
      it checked whether the pointer was in-range.  Second, it would let a
      pointer reach a position _before_ the start of a string, which is
      not allowed.
      
      I've removed the assertion about empty messages: empty messages can
      be their own warning IMO.
      
      I've also added tests for this formatting code, to make sure it
      actually works.
      51182252
    • Amadeusz Pawlik's avatar
      ec7a6757
  2. 11 Aug, 2020 1 commit
  3. 31 Jul, 2020 1 commit
  4. 09 Jul, 2020 1 commit
  5. 23 Jun, 2020 1 commit
  6. 30 Jan, 2020 1 commit
    • Nick Mathewson's avatar
      Rewrite control_event_signal() to use signal_table. · 7bd67181
      Nick Mathewson authored
      When we added the ACTIVE and DORMANT virtual signals, we taught the
      signal command to handle them, but we didn't teach SIGNAL event to
      report them.
      
      To solve this problem and prevent it from recurring, this patch
      revises the implementation of control_event_signal() to use the same
      signal_table that handle_control_signal() uses.  This way, the two
      controller commands can't become out of sync.
      
      Fixes bug 33104; bugfix on 0.4.0.1-alpha.
      7bd67181
  7. 08 Jan, 2020 1 commit
  8. 29 Nov, 2019 3 commits
  9. 27 Nov, 2019 1 commit
  10. 07 Nov, 2019 1 commit
    • Nick Mathewson's avatar
      Make all our struct names end with "_t". · 4845ab53
      Nick Mathewson authored
      This is an automated commit, generated by this command:
      
      ./scripts/maint/rename_c_identifier.py \
              address_ttl_s address_ttl_t \
              aes_cnt_cipher aes_cnt_cipher_t \
              authchallenge_data_s authchallenge_data_t \
              authenticate_data_s authenticate_data_t \
              cached_bw_event_s cached_bw_event_t \
              cbuf cbuf_t \
              cell_ewma_s cell_ewma_t \
              certs_data_s certs_data_t \
              channel_idmap_entry_s channel_idmap_entry_t \
              channel_listener_s channel_listener_t \
              channel_s channel_t \
              channel_tls_s channel_tls_t \
              circuit_build_times_s circuit_build_times_t \
              circuit_muxinfo_s circuit_muxinfo_t \
              circuitmux_policy_circ_data_s circuitmux_policy_circ_data_t \
              circuitmux_policy_data_s circuitmux_policy_data_t \
              circuitmux_policy_s circuitmux_policy_t \
              circuitmux_s circuitmux_t \
              coord coord_t \
              cpuworker_job_u cpuworker_job_u_t \
              cv_testinfo_s cv_testinfo_t \
              ddmap_entry_s ddmap_entry_t \
              dircollator_s dircollator_t \
              dist_ops dist_ops_t \
              ecdh_work_s ecdh_work_t \
              ewma_policy_circ_data_s ewma_policy_circ_data_t \
              ewma_policy_data_s ewma_policy_data_t \
              fp_pair_map_entry_s fp_pair_map_entry_t \
              fp_pair_map_s fp_pair_map_t \
              guard_selection_s guard_selection_t \
              mbw_cache_entry_s mbw_cache_entry_t \
              outbuf_table_ent_s outbuf_table_ent_t \
              queued_event_s queued_event_t \
              replyqueue_s replyqueue_t \
              rsa_work_s rsa_work_t \
              sandbox_cfg_elem sandbox_cfg_elem_t \
              scheduler_s scheduler_t \
              smp_param smp_param_t \
              socket_table_ent_s socket_table_ent_t \
              state_s state_t \
              threadpool_s threadpool_t \
              timeout_cb timeout_cb_t \
              tor_libevent_cfg tor_libevent_cfg_t \
              tor_threadlocal_s tor_threadlocal_t \
              url_table_ent_s url_table_ent_t \
              worker_state_s worker_state_t \
              workerthread_s workerthread_t \
              workqueue_entry_s workqueue_entry_t
      4845ab53
  11. 27 Oct, 2019 1 commit
  12. 22 Oct, 2019 2 commits
  13. 16 Oct, 2019 1 commit
    • Tobias Stoeckmann's avatar
      Check tor_vasprintf for error return values. · d91ad511
      Tobias Stoeckmann authored
      
      
      In case of error, a negative value will be returned or NULL written into
      first supplied argument.
      
      This patch uses both cases to comply with style in the specific files.
      
      A tor_vasprintf error in process_vprintf would lead to a NULL dereference
      later on in buf_add, because the return value -1 casted to size_t would
      pass an assertion check inside of buf_add.
      
      On the other hand, common systems will fail on such an operation, so it
      is not a huge difference to a simple assertion. Yet it is better to
      properly fail instead of relying on such behaviour on all systems.
      Signed-off-by: default avatarTobias Stoeckmann <tobias@stoeckmann.org>
      d91ad511
  14. 05 Sep, 2019 1 commit
  15. 19 Aug, 2019 1 commit
  16. 08 Jul, 2019 1 commit
  17. 30 Apr, 2019 1 commit
    • Taylor Yu's avatar
      Split reply formatting out of control_fmt.c · 8e7316ba
      Taylor Yu authored
      Split the core reply formatting code out of control_fmt.c into
      control_proto.c.  The remaining code in control_format.c deals with
      specific subsystems and will eventually move to join those subsystems.
      8e7316ba
  18. 25 Mar, 2019 2 commits