That PullReq fixed malfunction in ConvertVAtoFileOffsetEx and avoid possible client crashes due to returning an not expected error value.
4 Changes:
ConvertVAtoFileOffsetEx() fails when the client pass a VA in the AddressToConvert (and sets AddressIsRVA=false to show it).
Fix: Added a handler for AddressIsRVA=false that uses the passed Imagebase to turn the VA into a RVA.
ConvertVAtoFileOffsetEx() returned INVALID_VALUE on error. But the client expect 0 in case of an error.
Result: INVALID_VALUE was misinterpreted as file offset was crashed the client when writting to the mem mapped location
Fix: before returning INVALID_VALUE is turned to 0
ConvertFileOffsetToVA() returned INVALID_VALUE on error.... same story as 2.
implementing 'ReturnType' for ConvertVAtoFileOffsetEx & ConvertFileOffsetToVA
That PullReq fixed malfunction in ConvertVAtoFileOffsetEx and avoid possible client crashes due to returning an not expected error value. 4 Changes:
ConvertVAtoFileOffsetEx() fails when the client pass a VA in the AddressToConvert (and sets AddressIsRVA=false to show it). Fix: Added a handler for AddressIsRVA=false that uses the passed Imagebase to turn the VA into a RVA.
ConvertVAtoFileOffsetEx() returned INVALID_VALUE on error. But the client expect 0 in case of an error. Result: INVALID_VALUE was misinterpreted as file offset was crashed the client when writting to the mem mapped location Fix: before returning INVALID_VALUE is turned to 0
ConvertFileOffsetToVA() returned INVALID_VALUE on error.... same story as 2.
implementing 'ReturnType' for ConvertVAtoFileOffsetEx & ConvertFileOffsetToVA
TODO: Also mirgate changes to https://github.com/x64dbg/GleeBug/blob/c5aed9fcccb9f2161af86cfefe0ef5006e913fc9/StaticEngine/Emulator.h#L507