~ruther/NosSmooth.Local

67a2b060c9fafa5b73ca24e91b50c4f5b8858e49 — Rutherther 3 years ago 5dc0704
feat(inject): make load return value 32bit to prevent receiving of non-zeroed memory
2 files changed, 4 insertions(+), 4 deletions(-)

M src/Inject/NosSmooth.Inject/nossmooth.cpp
M src/Inject/NosSmooth.Inject/nossmooth.h
M src/Inject/NosSmooth.Inject/nossmooth.cpp => src/Inject/NosSmooth.Inject/nossmooth.cpp +3 -3
@@ 98,12 98,12 @@ load_assembly_and_get_function_pointer_fn get_dotnet_load_assembly(const char_t*
    return (load_assembly_and_get_function_pointer_fn)load_assembly_and_get_function_pointer;
}

bool LoadAndCallMethod(LoadParams* params)
int LoadAndCallMethod(LoadParams* params)
{
    if (!load_hostfxr())
    {
        assert(false && "Failure: load_hostfxr()");
        return false;
        return 0;
    }

    load_assembly_and_get_function_pointer_fn load_assembly_and_get_function_pointer = nullptr;


@@ 121,5 121,5 @@ bool LoadAndCallMethod(LoadParams* params)
        (void**)&main);
    assert(rc == 0 && main != nullptr && "Failure: load_assembly_and_get_function_pointer()");
    main();
    return true;
    return 1;
}
\ No newline at end of file

M src/Inject/NosSmooth.Inject/nossmooth.h => src/Inject/NosSmooth.Inject/nossmooth.h +1 -1
@@ 12,4 12,4 @@ struct LoadParams
#pragma pack(pop)
#define DllExport extern "C" __declspec( dllexport )

DllExport bool LoadAndCallMethod(LoadParams* params);
\ No newline at end of file
DllExport int LoadAndCallMethod(LoadParams* params);
\ No newline at end of file

Do not follow this link