apply_patch

Function apply_patch 

Source
pub unsafe fn apply_patch(table: JumpTable) -> Result<(), PatchError>
Expand description

Apply the patch using a given jump table.

§Safety

This function is unsafe because it detours existing functions in memory. This is wildly unsafe, especially if the JumpTable is malformed. Only run this if you know what you’re doing.

If the pointers are incorrect, function type signatures will be incorrect and the program will crash, sometimes in a way that requires a restart of your entire computer. Be careful.

§Warning

This function will load the library and thus allocates. In cannot be used when the program is stopped (ie in a signal handler).