liboqs icon indicating copy to clipboard operation
liboqs copied to clipboard

Improve Error Handling to Prevent Exit, Crashes and Memory Leaks

Open songlingatpan opened this issue 5 months ago • 7 comments

This PR focuses on improving the robustness and stability of the code by enhancing error handling. The main objectives of this update include:

  • Preventing the program from exiting or crashing in case of errors
  • Preventing memory leaks by checking for NULL pointers after memory allocations and ensuring proper memory cleanup in failure cases.
  • Adding safeguards for potential memory allocation issues, ensuring the program doesn't crash or exit unexpectedly.

Note: This PR does not introduce any new functionality but aims to stabilize the existing code and make it more resilient to errors. Future test cases will be added to simulate scenarios such as out-of-memory conditions and ensure these improvements work as intended.

songlingatpan avatar Sep 17 '24 23:09 songlingatpan