1. 22 Jun, 2018 3 commits
    • config_file: avoid free'ing OOM buffers · e1e90dcc
      Buffers which ran out of memory will never have any memory attached to
      them. As such, it is not necessary to call `git_buf_free` if the buffer
      is out of memory.
      Patrick Steinhardt committed
    • config_parse: always sanitize out-parameters in `parse_variable` · 83b5f161
      The `parse_variable` function has two out parameters `var_name` and
      `var_value`. Currently, those are not being sanitized to `NULL`. when.
      any error happens inside of the `parse_variable` function. Fix that.
      While at it, the coding style is improved to match our usual coding
      practices more closely.
      Patrick Steinhardt committed
    • config_parse: have `git_config_parse` own entry value and name · e51e29e8
      The function `git_config_parse` uses several callbacks to pass data
      along to the caller as it parses the file. One design shortcoming here
      is that strings passed to those callbacks are expected to be freed by
      them, which is really confusing.
      
      Fix the issue by changing memory ownership here. Instead of expecting
      the `on_variable` callbacks to free memory for `git_config_parse`, just
      do it inside of `git_config_parse`. While this obviously requires a bit
      more memory allocation churn due to having to copy both name and value
      at some places, this shouldn't be too much of a burden.
      Patrick Steinhardt committed
  2. 18 Jun, 2018 5 commits
  3. 17 Jun, 2018 1 commit
  4. 16 Jun, 2018 1 commit
  5. 15 Jun, 2018 28 commits
  6. 12 Jun, 2018 2 commits