Improved the robustness of memory allocations by adding error handling for potential allocation failures.
Added comments in the code for better understanding of the functions and logic used.
Made adjustments in functions to handle potential errors and avoid application crashes.
Improved handling of thread creation and termination in remote processes.
Added additional checks for the successful allocation of memory in the target process.
Ensured that the DLL path is correctly copied to the shared data structure before injection.
Enhanced memory management by ensuring allocated memory is released when not needed.
Changes:
Adjusted buffer size calculations to account for the null terminator and potential additional backslashes in UtilGetPath function.
Enhanced the UtilSetDefaultConfigValue function with error handling for failed file reads and unsuccessful memory reallocations.
Changed the buffer size increment strategy in the UtilSetDefaultConfigValue function for better memory management.
Fixes:
Fixed potential memory leaks by ensuring allocated memory is released in error scenarios.
Fixed potential application crashes by adding error handling for unsuccessful thread creation.
Fixed a potential issue in RemoteSyncData function where memory could be written to an unallocated location.
All these updates were designed to improve the stability, robustness and readability of the code, and to ensure better error handling across the application.
Changelog:
Enhancements:
Changes:
UtilGetPath
function.UtilSetDefaultConfigValue
function with error handling for failed file reads and unsuccessful memory reallocations.UtilSetDefaultConfigValue
function for better memory management.Fixes:
RemoteSyncData
function where memory could be written to an unallocated location.All these updates were designed to improve the stability, robustness and readability of the code, and to ensure better error handling across the application.