xmrig-minimized-dll/src/base/api
Dave Walker (Daviey) daa6328418 Fix segfault in HTTP API rebind
Previously with HTTP API enabled on brenchmarking run, it is possible
to cause a segfault due to an issue handling the m_httpd pointer and
rebinding.

  - Initialize m_httpd to nullptr to indicate when it's not in use.
  - Safely delete m_httpd in Api's destructor to prevent use-after-free
    issues.
  - Add checks to ensure m_httpd is not nullptr before usage in start,
    stop, and tick methods.
  - Log errors for HTTP server start failures to aid in debugging.

Fixes MoneroOcean/xmrig#120

Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2024-02-11 17:52:36 +00:00
..
interfaces Added "GET /2/dmi" API endpoint. 2021-01-20 22:54:02 +07:00
requests Code cleanup based on Clang-Tidy. 2021-08-25 18:45:15 +07:00
Api.cpp Fix segfault in HTTP API rebind 2024-02-11 17:52:36 +00:00
Api.h Code cleanup. 2023-06-07 20:48:56 +07:00
Httpd.cpp Code cleanup based on Clang-Tidy. 2021-08-25 18:45:15 +07:00
Httpd.h Code cleanup. 2023-06-07 20:48:56 +07:00