Closed berndb84 closed 3 years ago
Hard to tell without the actual code.
Check the size of your input and output buffers; make sure these are properly allocated and of the right size. Try with a simple example first, and then gradually move it to your actual application.
I am using libsodium to decrypt a PE section in a DLL. I have build a 32Bit DLL and a 64Bit with precompiled libsodium binaries (32Bit and 64Bit). The 32Bit DLL decrypts the section as expected, but the 64Bit DLL is crashing and throwing these error:
Access violation reading location 0x806A9000
The adress mentioned belongs to the encrypted PE section and used as input into
crypto_secretbox_open_detached
. However, when I use the debugger the adress is shown as 0x1806A9000The stacketrace shows that
memcpy
is responsible for these error. It is used inload32_le
.Stacktrace
I don`t know where the problem is.