]> git.ipfire.org Git - thirdparty/curl.git/commit
rustls: apply memory function overrides, fixing an ECH buffer free
authorViktor Szakats <commit@vsz.me>
Sun, 6 Jul 2025 10:35:00 +0000 (12:35 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 6 Jul 2025 18:08:58 +0000 (20:08 +0200)
commitcbf261e2de9f349c5b1ef0a8dc980988558455c5
treec250cb347f7ff45a8bc7f139272b6b93bac49596
parent822e47cdceb3fae0c1ca2857a75c112709488631
rustls: apply memory function overrides, fixing an ECH buffer free

Fixing:

- a raw `free()` in ECH code that's malloced in lib code, causing
  an invalid free, also reported by valgrind (in non-unity builds).

  And in unity builds adjusted to behave like non-unity via #17827:
  Ref: https://github.com/curl/curl/actions/runs/16093372427/job/45421778472?pr=17827#step:39:3321

- a local pair of `malloc()`/`free()` to use curl's memory allocators,
  and participate in memory tracking when enabled.

Cherry-picked from #17827
Closes #17830
lib/vtls/rustls.c